diff options
Diffstat (limited to 'src/libmain/shared.cc')
-rw-r--r-- | src/libmain/shared.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc index f300fbf1b463..575fa339a86c 100644 --- a/src/libmain/shared.cc +++ b/src/libmain/shared.cc @@ -90,6 +90,7 @@ static void setLogType(string lt) if (lt == "pretty") logType = ltPretty; else if (lt == "escapes") logType = ltEscapes; else if (lt == "flat") logType = ltFlat; + else if (lt == "systemd") logType = ltSystemd; else throw UsageError("unknown log type"); } @@ -116,6 +117,9 @@ void initNix() std::ios::sync_with_stdio(false); + if (getEnv("IN_SYSTEMD") == "1") + logType = ltSystemd; + settings.processEnvironment(); settings.loadConfFile(); |