Commit fe8c37ef by 2xsec

tools: lxc-freeze: add default log priority & cleanups

Signed-off-by: 's avatar2xsec <dh48.jeong@samsung.com>
parent c2a23ef6
......@@ -53,6 +53,8 @@ Options :\n\
.options = my_longopts,
.parser = NULL,
.checker = NULL,
.log_priority = "ERROR",
.log_file = "none",
};
int main(int argc, char *argv[])
......@@ -63,8 +65,6 @@ int main(int argc, char *argv[])
if (lxc_arguments_parse(&my_args, argc, argv))
exit(EXIT_FAILURE);
/* Only create log if explicitly instructed */
if (my_args.log_file || my_args.log_priority) {
log.name = my_args.name;
log.file = my_args.log_file;
log.level = my_args.log_priority;
......@@ -74,7 +74,6 @@ int main(int argc, char *argv[])
if (lxc_log_init(&log))
exit(EXIT_FAILURE);
}
c = lxc_container_new(my_args.name, my_args.lxcpath[0]);
if (!c) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment