From 3efcef3505d535568060cc50327ebcb898d3ef98 Mon Sep 17 00:00:00 2001 From: Kjell Hedstrom Date: Wed, 19 Aug 2015 10:19:55 -0600 Subject: [PATCH] my own code review I --- example/main_fatal_choice.cpp | 1 + src/g3log/logworker.hpp | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/example/main_fatal_choice.cpp b/example/main_fatal_choice.cpp index c9bd4df..7b6fbbb 100644 --- a/example/main_fatal_choice.cpp +++ b/example/main_fatal_choice.cpp @@ -250,6 +250,7 @@ int main(int argc, char **argv) auto worker = g3::LogWorker::createLogWorker(); auto handle= worker->addDefaultLogger(argv[0], path_to_log_file); g3::initializeLogging(worker.get()); + g3::setFatalPreLoggingHook(&breakHere); std::future log_file_name = handle->call(&g3::FileSink::fileName); std::cout << "**** G3LOG FATAL EXAMPLE ***\n\n" << "Choose your type of fatal exit, then " diff --git a/src/g3log/logworker.hpp b/src/g3log/logworker.hpp index 7646566..a1e49e0 100644 --- a/src/g3log/logworker.hpp +++ b/src/g3log/logworker.hpp @@ -70,8 +70,6 @@ namespace g3 { /** A convenience function to add the default g3::FileSink to the log worker - - @param the worker (no, don't put in nullptr here!) @param log_prefix that you want @param log_directory where the log is to be stored. @return a handle for API access to the sink. See the README for example usage @@ -85,7 +83,7 @@ namespace g3 { std::future log_file_name = sinkHandle->call(&FileSink::fileName); std::cout << "The filename is: " << log_file_name.get() << std::endl; - // something like: /tmp/ + // something like: /tmp/my_test_log.g3log.20150819-100300.log */ std::unique_ptr addDefaultLogger(const std::string& log_prefix, const std::string& log_directory);