]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
use different log categories in commands
authorCedric Le Goater <clg@fr.ibm.com>
Wed, 13 Jan 2010 17:51:15 +0000 (18:51 +0100)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Wed, 13 Jan 2010 17:51:15 +0000 (18:51 +0100)
lxc_<cmd>.c and <cmd>.c files use the same log category : lxc_<cmd>.
The symbol is multiply defined and linking statically lxc commands is
not possible.

The patch introduces new log categories with a '_ui' suffix to
differentiate the command line interface from the library routine.

Reported-by: Ciprian Dorin, Craciun <ciprian.craciun@gmail.com>
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/lxc_cgroup.c
src/lxc/lxc_checkpoint.c
src/lxc/lxc_console.c
src/lxc/lxc_execute.c
src/lxc/lxc_monitor.c
src/lxc/lxc_restart.c
src/lxc/lxc_start.c
src/lxc/lxc_unshare.c
src/lxc/lxc_wait.c

index f394d26fef4e0814599389162825e89e13aab422..d5aa5aa9a7f909f833e64ee2c8407dc85696966b 100644 (file)
@@ -31,7 +31,7 @@
 
 #include "arguments.h"
 
-lxc_log_define(lxc_cgroup, lxc);
+lxc_log_define(lxc_cgroup_ui, lxc_cgroup);
 
 static int my_checker(const struct lxc_arguments* args)
 {
index 018068e970a16b0175c87a9fed4a05956d26a9d3..4fee1193620ddf99e7bd231e1f82955eabab10b7 100644 (file)
@@ -35,7 +35,7 @@
 #include "arguments.h"
 #include "config.h"
 
-lxc_log_define(lxc_checkpoint, lxc);
+lxc_log_define(lxc_checkpoint_ui, lxc_checkpoint);
 
 static int my_checker(const struct lxc_arguments* args)
 {
index d6ba7e45ccbcd67c9e6c2172a6a23e725c72c54d..2ee1c483faeea5ee38035acefd17251465a8a802 100644 (file)
@@ -44,7 +44,7 @@
 
 #include "arguments.h"
 
-lxc_log_define(lxc_console, lxc);
+lxc_log_define(lxc_console_ui, lxc_console);
 
 static int my_parser(struct lxc_arguments* args, int c, char* arg)
 {
index 50fec10d4f3a3eea9fd67286685c61e4b5aabfeb..10469240b2ac7b24b7db80e283624bb070cd8d1d 100644 (file)
@@ -39,7 +39,7 @@
 #include "arguments.h"
 #include "config.h"
 
-lxc_log_define(lxc_execute, lxc);
+lxc_log_define(lxc_execute_ui, lxc_start);
 
 static int my_checker(const struct lxc_arguments* args)
 {
index 7d141888e58976e87f48da0c1cefa3daa707a447..314d4a5ee3314163129893b601e147544b4d2d64 100644 (file)
@@ -33,7 +33,7 @@
 #include <lxc/monitor.h>
 #include "arguments.h"
 
-lxc_log_define(monitor, lxc);
+lxc_log_define(lxc_monitor_ui, lxc_monitor);
 
 static const struct option my_longopts[] = {
        LXC_COMMON_OPTIONS
index 17cee0b7013da392839a73eaa865a4d57452af1b..9cad3177a987ec8c9295b50d652a323fdae60edc 100644 (file)
@@ -32,7 +32,7 @@
 
 #include "arguments.h"
 
-lxc_log_define(lxc_restart, lxc);
+lxc_log_define(lxc_restart_ui, lxc_restart);
 
 static int my_checker(const struct lxc_arguments* args)
 {
index fdd3b156872da133ebc8d4940a59da7ea65c6db4..9cde900aa9d9d7e7331055eac2edd84cbb79b52b 100644 (file)
@@ -48,7 +48,7 @@
 #include "confile.h"
 #include "arguments.h"
 
-lxc_log_define(lxc_start, lxc);
+lxc_log_define(lxc_start_ui, lxc_start);
 
 static int my_parser(struct lxc_arguments* args, int c, char* arg)
 {
index 463968780bd88399c000ba3e1bbddc9dc18b73fc..9414494c9e699f0db0fada3c5caa4116fd20d486 100644 (file)
@@ -35,7 +35,7 @@
 #include <lxc/log.h>
 #include <lxc/namespace.h>
 
-lxc_log_define(lxc_unshare, lxc);
+lxc_log_define(lxc_unshare_ui, lxc);
 
 void usage(char *cmd)
 {
index a5199e212361929677abbe7ff0394eae71f60159..a58e0c87ca7857e0add6d4790d88c3ad87d6d819 100644 (file)
@@ -31,7 +31,7 @@
 #include <lxc/monitor.h>
 #include "arguments.h"
 
-lxc_log_define(lxc_wait, lxc);
+lxc_log_define(lxc_wait_ui, lxc_monitor);
 
 static int my_checker(const struct lxc_arguments* args)
 {