Skip to content

Commit

Permalink
shuffle around a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamc committed Feb 17, 2025
1 parent 0bbeb15 commit fa495e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/libstore/daemon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@ void processConnection(
auto prevLogger = nix::logger;
// FIXME
if (!recursive)
logger = tunnelLogger;
logger = makeTeeLogger({tunnelLogger, nix::logger});

unsigned int opCount = 0;

Expand Down
7 changes: 4 additions & 3 deletions src/nix/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,6 @@ static auto rCmdHelpStores = registerCommand<CmdHelpStores>("help-stores");

void mainWrapped(int argc, char * * argv)
{
if (auto logFile = getEnv("NIX_LOG_FILE")) {
logger = makeTeeLogger({logger, makeJSONLogger(*logFile)});
}

savedArgv = argv;

Expand Down Expand Up @@ -392,6 +389,10 @@ void mainWrapped(int argc, char * * argv)
}
#endif

if (auto logFile = getEnv("NIX_LOG_FILE")) {
logger = makeTeeLogger({logger, makeJSONLogger(*logFile)});
}

Finally f([] { logger->stop(); });

programPath = argv[0];
Expand Down

0 comments on commit fa495e7

Please sign in to comment.