From 31cc9366fc81c3f478b31a206daa6b38801cd3b1 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 12 Apr 2017 14:52:49 +0200 Subject: [PATCH] Initialise logger --- perl/lib/Nix/Store.xs | 1 - src/libmain/shared.cc | 2 -- src/libutil/logging.cc | 2 +- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/perl/lib/Nix/Store.xs b/perl/lib/Nix/Store.xs index f613e3df3..46b41f923 100644 --- a/perl/lib/Nix/Store.xs +++ b/perl/lib/Nix/Store.xs @@ -25,7 +25,6 @@ static ref store() static std::shared_ptr _store; if (!_store) { try { - logger = makeDefaultLogger(); settings.loadConfFile(); settings.update(); settings.lockCPU = false; diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc index a720afd6c..c1828aa7d 100644 --- a/src/libmain/shared.cc +++ b/src/libmain/shared.cc @@ -106,8 +106,6 @@ void initNix() std::cerr.rdbuf()->pubsetbuf(buf, sizeof(buf)); #endif - logger = makeDefaultLogger(); - /* Initialise OpenSSL locking. */ opensslLocks = std::vector(CRYPTO_num_locks()); CRYPTO_set_locking_callback(opensslLockCallback); diff --git a/src/libutil/logging.cc b/src/libutil/logging.cc index d9e8d22d7..53f6260b7 100644 --- a/src/libutil/logging.cc +++ b/src/libutil/logging.cc @@ -3,7 +3,7 @@ namespace nix { -Logger * logger = 0; +Logger * logger = makeDefaultLogger(); class SimpleLogger : public Logger {