Browse Source

[1704] Clarify why the null logger is used in logger_example

Mukund Sivaraman 13 years ago
parent
commit
07851523e6
1 changed files with 5 additions and 1 deletions
  1. 5 1
      src/lib/log/tests/logger_example.cc

+ 5 - 1
src/lib/log/tests/logger_example.cc

@@ -281,7 +281,11 @@ int main(int argc, char** argv) {
         LoggerManager::readLocalMessageFile(argv[optind]);
     }
 
-    // Log a few messages to different loggers.
+    // Log a few messages to different loggers. Here, we switch to using
+    // null interprocess sync objects for the loggers below as the
+    // logger example can be used as a standalone program (which may not
+    // have write access to a local state directory to create
+    // lockfiles).
     isc::log::Logger logger_ex(ROOT_NAME);
     logger_ex.setInterprocessSync(new isc::util::InterprocessSyncNull("logger"));
     isc::log::Logger logger_alpha("alpha");