Support systemd log severity prefixes
This is mostly useful for hydra-queue-runner.
This commit is contained in:
parent
b3491c781c
commit
db55940d9e
3 changed files with 18 additions and 1 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue