2
0
mirror of git://github.com/lxc/lxc synced 2025-08-30 20:19:33 +00:00

log: fix log_append_stderr()

Log output currently looks like this:

	lxc-copy: debbdev/lxcdir.c: dir_clonepaths: 45 directories cannot be snapshotted.  Try aufs or overlayfs.

we rather want it to be:

	lxc-copy: deb: bdev/lxcdir.c: dir_clonepaths: 45 directories cannot be snapshotted.  Try aufs or overlayfs.

Signed-off-by: Christian Brauner <cbrauner@suse.de>
This commit is contained in:
Christian Brauner
2016-08-11 23:10:17 +02:00
parent e00456c820
commit c3ff6e245d

View File

@@ -125,7 +125,7 @@ static int log_append_stderr(const struct lxc_log_appender *appender,
if (event->priority < LXC_LOG_PRIORITY_ERROR)
return 0;
fprintf(stderr, "%s: %s", log_prefix, log_vmname ? log_vmname : "");
fprintf(stderr, "%s: %s%s", log_prefix, log_vmname ? log_vmname : "", log_vmname ? ": " : "");
fprintf(stderr, "%s: %s: %d ", event->locinfo->file, event->locinfo->func, event->locinfo->line);
vfprintf(stderr, event->fmt, *event->vap);
fprintf(stderr, "\n");