]> git.proxmox.com Git - mirror_lxc.git/blobdiff - src/lxc/tools/lxc_ls.c
API: expose function lxc_log_init
[mirror_lxc.git] / src / lxc / tools / lxc_ls.c
index 63053b110eb5ad5687af6314537c5cae9cea0eac..28d423909411b1c2e9b8966583cdc8ad368a3285 100644 (file)
@@ -203,6 +203,7 @@ Options :\n\
 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.
@@ -218,8 +219,14 @@ int main(int argc, char *argv[])
         * 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();