mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
JSONLogger: Log to a file descriptor instead of another Logger
Logging to another Logger was kind of nonsensical - it was really just an easy way to get it to write its output to stderr, but that only works if the underlying logger writes to stderr. This change is needed to make it easy to log JSON output somewhere else (like a file or socket).
This commit is contained in:
parent
ca2e52690d
commit
bc66a9bbcf
5 changed files with 10 additions and 9 deletions
|
@ -51,7 +51,7 @@ static bool allSupportedLocally(Store & store, const std::set<std::string>& requ
|
|||
static int main_build_remote(int argc, char * * argv)
|
||||
{
|
||||
{
|
||||
logger = makeJSONLogger(*logger);
|
||||
logger = makeJSONLogger(STDERR_FILENO);
|
||||
|
||||
/* Ensure we don't get any SSH passphrase or host key popups. */
|
||||
unsetenv("DISPLAY");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue