]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc/tools: set default log_priority to ERROR 4421/head
authorAlexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Tue, 2 Apr 2024 11:58:35 +0000 (13:58 +0200)
committerAlexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Tue, 2 Apr 2024 12:00:36 +0000 (14:00 +0200)
For some reason, we don't have default log_priority
set for many tools which leads to the situation when
tools can fail silently even if error occurs.

Fixes: #4405
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
src/lxc/tools/lxc_autostart.c
src/lxc/tools/lxc_copy.c
src/lxc/tools/lxc_info.c
src/lxc/tools/lxc_ls.c
src/lxc/tools/lxc_monitor.c
src/lxc/tools/lxc_snapshot.c
src/lxc/tools/lxc_top.c

index 713e8efdf550d5394fe19145428ccbe5d7d347ec..1ad186a131f0c3dba4b264fcba89dc3adb2125f4 100644 (file)
@@ -85,6 +85,8 @@ Options:\n\
        .parser   = my_parser,
        .checker  = NULL,
        .timeout = 60,
+       .log_priority = "ERROR",
+       .log_file     = "none",
 };
 
 static int list_contains_entry(char *str_ptr, struct lxc_list *p1) {
index bc2e1db7ded42351700b6881ad65d5b0eda49fe8..3e6cfe6406a3123f3bf685dbffc88b362588585f 100644 (file)
@@ -112,6 +112,8 @@ Options :\n\
        .daemonize = 1,
        .quiet = false,
        .tmpfs = false,
+       .log_priority = "ERROR",
+       .log_file     = "none",
 };
 
 static struct mnts *add_mnt(struct mnts **mnts, unsigned int *num,
index 8929720b142d8df527f8531dc18ce864fc1a86d0..681b5975218a4b9cd03855420366fd967305b05e 100644 (file)
@@ -81,6 +81,8 @@ Options :\n\
        .options  = my_longopts,
        .parser   = my_parser,
        .checker  = NULL,
+       .log_priority = "ERROR",
+       .log_file     = "none",
 };
 
 static void str_chomp(char *buf)
index 2be4e790a52c866f3dea18443f08ee55ab720275..5f8cece69ae666744805f5fa9c274eed9c2cffc0 100644 (file)
@@ -186,6 +186,8 @@ Options :\n\
        .options = my_longopts,
        .parser = my_parser,
        .ls_nesting = 0,
+       .log_priority = "ERROR",
+       .log_file     = "none",
 };
 
 int __attribute__((weak, alias("lxc_ls_main"))) main(int argc, char *argv[]);
index 4c6d063e305e3b74fb315743becf4a49bcf50b01..7e96f880b7f94b2e5e878f92f1c9c38e82d71eab 100644 (file)
@@ -69,6 +69,8 @@ Options :\n\
        .parser   = my_parser,
        .checker  = NULL,
        .lxcpath_additional = -1,
+       .log_priority = "ERROR",
+       .log_file     = "none",
 };
 
 static void close_fds(struct pollfd *fds, nfds_t nfds)
index 83effaf686965c9b632b3f63058ef98248ab9d0c..08761c5e6892542ab08c85bd50bcceae89ba2766 100644 (file)
@@ -51,6 +51,8 @@ Options :\n\
        .parser = my_parser,
        .checker = NULL,
        .task = SNAP,
+       .log_priority = "ERROR",
+       .log_file     = "none",
 };
 
 static int do_snapshot(struct lxc_container *c, char *commentfile);
index 3ddaf89e7a8919042e9d110ea6dc66b7c607a819..aa6e7209e3b46fafef9a6440760b6e8290844d13 100644 (file)
@@ -116,6 +116,8 @@ Options :\n\
        .parser   = my_parser,
        .checker  = NULL,
        .lxcpath_additional = -1,
+       .log_priority = "ERROR",
+       .log_file     = "none",
 };
 
 static void stdin_tios_restore(void)