[lxc-devel] [PATCH] lxc-checkpoint should actually log things
Stéphane Graber
stgraber at ubuntu.com
Fri Sep 19 21:19:47 UTC 2014
On Thu, Sep 18, 2014 at 09:43:08AM -0500, Tycho Andersen wrote:
> Looks like lxc-checkpoint was missing the log inititalization code, so it never
> actually logged anything when the options were provided.
>
> Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>
> ---
> src/lxc/lxc_checkpoint.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/src/lxc/lxc_checkpoint.c b/src/lxc/lxc_checkpoint.c
> index 8dc2c17..698e434 100644
> --- a/src/lxc/lxc_checkpoint.c
> +++ b/src/lxc/lxc_checkpoint.c
> @@ -174,6 +174,15 @@ int main(int argc, char *argv[])
> if (lxc_arguments_parse(&my_args, argc, argv))
> exit(1);
>
> + if (!my_args.log_file)
> + my_args.log_file = "none";
> +
> + if (lxc_log_init(my_args.name, my_args.log_file, my_args.log_priority,
> + my_args.progname, my_args.quiet, my_args.lxcpath[0]))
> + exit(1);
> +
> + lxc_log_options_no_override();
> +
> c = lxc_container_new(my_args.name, my_args.lxcpath[0]);
> if (!c) {
> fprintf(stderr, "System error loading %s\n", my_args.name);
> --
> 1.9.1
>
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel
--
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20140919/7f94e96d/attachment.sig>
More information about the lxc-devel
mailing list