summaryrefslogtreecommitdiff
path: root/src/journal-remote/journal-upload.c
diff options
context:
space:
mode:
authorFilipe Brandenburger <filbranden@gmail.com>2020-06-17 12:17:54 -0700
committerLennart Poettering <lennart@poettering.net>2020-06-24 16:49:26 +0200
commit41d1f469cf10f5f3e9cb4f4853ace9b0cfe5beae (patch)
tree5a8bbe67cfafb46b99daf93f219699f93b968a95 /src/journal-remote/journal-upload.c
parenta1ba8c5b71164665ccb53c9cec384e5eef7d3689 (diff)
downloadsystemd-41d1f469cf10f5f3e9cb4f4853ace9b0cfe5beae.tar.gz
log: introduce log_parse_environment_cli() and log_setup_cli()
Presently, CLI utilities such as systemctl will check whether they have a tty attached or not to decide whether to parse /proc/cmdline or EFI variable SystemdOptions looking for systemd.log_* entries. But this check will be misleading if these tools are being launched by a daemon, such as a monitoring daemon or automation service that runs in background. Make log handling of CLI tools uniform by never checking /proc/cmdline or EFI variables to determine the logging level. Furthermore, introduce a new log_setup_cli() shortcut to set up common options used by most command-line utilities.
Diffstat (limited to 'src/journal-remote/journal-upload.c')
-rw-r--r--src/journal-remote/journal-upload.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/journal-remote/journal-upload.c b/src/journal-remote/journal-upload.c
index bd58fdbcdf..e169a27eb3 100644
--- a/src/journal-remote/journal-upload.c
+++ b/src/journal-remote/journal-upload.c
@@ -821,7 +821,7 @@ static int run(int argc, char **argv) {
int r;
log_show_color(true);
- log_parse_environment();
+ log_parse_environment_cli();
/* The journal merging logic potentially needs a lot of fds. */
(void) rlimit_nofile_bump(HIGH_RLIMIT_NOFILE);