int main(int argc, char *argv[])
{
int ret = EXIT_FAILURE;
+ struct lxc_log log;
/*
* The lxc parser requires that my_args.name is set. So let's satisfy
* that condition by setting a dummy name which is never used.
* We set the first argument that usually takes my_args.name to NULL so
* that the log is only used when the user specifies a file.
*/
- if (lxc_log_init(NULL, my_args.log_file, my_args.log_priority,
- my_args.progname, my_args.quiet, my_args.lxcpath[0]))
+ log.name = NULL;
+ log.file = my_args.log_file;
+ log.priority = my_args.log_priority;
+ log.prefix = my_args.progname;
+ log.quiet = my_args.quiet;
+ log.lxcpath = my_args.lxcpath[0];
+
+ if (lxc_log_init(&log))
exit(EXIT_FAILURE);
lxc_log_options_no_override();