Skip to content

Commit

Permalink
supress exceptions from the logging library
Browse files Browse the repository at this point in the history
supress all exceptions from logging library.

Signed-off-by: Yadong Qi <yadong.qi@intel.com>
  • Loading branch information
YadongQi authored and sysopenci committed Apr 3, 2023
1 parent 571672c commit 6f89937
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/utils/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <boost/log/utility/setup/console.hpp>
#include <boost/log/utility/setup/file.hpp>
#include <boost/log/utility/setup/common_attributes.hpp>
#include <boost/log/utility/exception_handler.hpp>
#include <boost/log/attributes/current_process_name.hpp>

#ifdef DEBUG
Expand Down Expand Up @@ -88,6 +89,8 @@ namespace logger {
<< expr::smessage));

logging::add_common_attributes();

logging::core::get()->set_exception_handler(logging::make_exception_suppressor());
}

inline void log2file(const char *file) {
Expand Down

0 comments on commit 6f89937

Please sign in to comment.