Unverified Commit d67beb9e by 2xsec

tools: lxc-unshare: apply default log priority

Signed-off-by: 's avatar2xsec <dh48.jeong@samsung.com>
parent 03c6d266
...@@ -102,6 +102,8 @@ Options :\n\ ...@@ -102,6 +102,8 @@ Options :\n\
.options = my_longopts, .options = my_longopts,
.parser = my_parser, .parser = my_parser,
.checker = NULL, .checker = NULL,
.log_priority = "ERROR",
.log_file = "none",
.daemonize = 0, .daemonize = 0,
.pidfile = NULL, .pidfile = NULL,
}; };
...@@ -325,8 +327,6 @@ int main(int argc, char *argv[]) ...@@ -325,8 +327,6 @@ int main(int argc, char *argv[])
if (lxc_arguments_parse(&my_args, argc, argv)) if (lxc_arguments_parse(&my_args, argc, argv))
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
/* Only create log if explicitly instructed */
if (my_args.log_file || my_args.log_priority) {
log.name = my_args.name; log.name = my_args.name;
log.file = my_args.log_file; log.file = my_args.log_file;
log.level = my_args.log_priority; log.level = my_args.log_priority;
...@@ -338,7 +338,6 @@ int main(int argc, char *argv[]) ...@@ -338,7 +338,6 @@ int main(int argc, char *argv[])
free_ifname_list(); free_ifname_list();
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
}
if (!*my_args.argv) { if (!*my_args.argv) {
ERROR("A command to execute in the new namespace is required"); ERROR("A command to execute in the new namespace is required");
......
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