Support systemd log severity prefixes
This is mostly useful for hydra-queue-runner.
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user