summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-03-14 04:48:14 +0100
committerLennart Poettering <lennart@poettering.net>2011-03-14 15:37:02 +0100
commit90df7e567f668b4d0e7761fd15fa8cebffc759a0 (patch)
tree24cfc4c908e5df6555b513e267163005ad3ead68 /src/main.c
parentb770165a4f54fed39221bcf33e9d040c12d04fcc (diff)
main: log to the console in a container
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 313afcce16..0c805c98a9 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1021,7 +1021,7 @@ int main(int argc, char *argv[]) {
if (getpid() == 1) {
arg_running_as = MANAGER_SYSTEM;
- log_set_target(LOG_TARGET_SYSLOG_OR_KMSG);
+ log_set_target(detect_container(NULL) > 0 ? LOG_TARGET_CONSOLE : LOG_TARGET_SYSLOG_OR_KMSG);
/* This might actually not return, but cause a
* reexecution */