about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-04-12T12·52+0200
committerEelco Dolstra <edolstra@gmail.com>2017-04-13T14·03+0200
commit31cc9366fc81c3f478b31a206daa6b38801cd3b1 (patch)
tree34f34331aa66fc8064f25006baaa4157218f236e
parent16c48560273804206953c39b540ffaf9ce0d350d (diff)
Initialise logger
-rw-r--r--perl/lib/Nix/Store.xs1
-rw-r--r--src/libmain/shared.cc2
-rw-r--r--src/libutil/logging.cc2
3 files changed, 1 insertions, 4 deletions
diff --git a/perl/lib/Nix/Store.xs b/perl/lib/Nix/Store.xs
index f613e3df329a..46b41f923924 100644
--- a/perl/lib/Nix/Store.xs
+++ b/perl/lib/Nix/Store.xs
@@ -25,7 +25,6 @@ static ref<Store> store()
     static std::shared_ptr<Store> _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 a720afd6cdd4..c1828aa7db88 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<std::mutex>(CRYPTO_num_locks());
     CRYPTO_set_locking_callback(opensslLockCallback);
diff --git a/src/libutil/logging.cc b/src/libutil/logging.cc
index d9e8d22d7685..53f6260b7886 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
 {