OmniSciDB  a47db9e897
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Logger.cpp File Reference
#include "Logger.h"
#include "StringTransform.h"
#include <boost/algorithm/string.hpp>
#include <boost/log/expressions.hpp>
#include <boost/log/sinks.hpp>
#include <boost/log/sources/global_logger_storage.hpp>
#include <boost/log/sources/logger.hpp>
#include <boost/log/sources/severity_feature.hpp>
#include <boost/log/support/date_time.hpp>
#include <boost/log/utility/setup.hpp>
#include <boost/phoenix.hpp>
#include <boost/variant.hpp>
#include <atomic>
#include <cstdlib>
#include <iostream>
#include <mutex>
#include <regex>
+ Include dependency graph for Logger.cpp:

Go to the source code of this file.

Classes

class  logger::Duration
 
class  logger::DurationTree
 
struct  logger::EraseDurationTrees
 

Namespaces

 logger
 

Typedefs

using logger::ClogSync = sinks::synchronous_sink< sinks::text_ostream_backend >
 
using logger::FileSync = sinks::synchronous_sink< sinks::text_file_backend >
 
using logger::Clock = std::chrono::steady_clock
 
using logger::DurationTreeNode = boost::variant< Duration, DurationTree & >
 
using logger::DurationTreeMap = std::unordered_map< std::thread::id, std::unique_ptr< DurationTree >>
 

Functions

std::string logger::filename (char const *path)
 
template<typename TAG >
std::string logger::replace_braces (std::string const &str, TAG const tag)
 
boost::log::attributes::current_process_id::value_type::native_type logger::get_native_process_id (boost::log::value_ref< boost::log::attributes::current_process_id::value_type, tag::process_id > const &pid)
 
template<typename SINK >
sinks::text_file_backend::open_handler_type logger::create_or_replace_symlink (boost::weak_ptr< SINK > weak_ptr, std::string &&symlink)
 
boost::log::formatting_ostream & logger::operator<< (boost::log::formatting_ostream &strm, boost::log::to_log_manip< Channel, tag::channel > const &manip)
 
boost::log::formatting_ostream & logger::operator<< (boost::log::formatting_ostream &strm, boost::log::to_log_manip< Severity, tag::severity > const &manip)
 
template<typename TAG , typename SINK >
void logger::set_formatter (SINK &sink)
 
template<typename FILE_SINK , typename TAG >
boost::shared_ptr< FILE_SINK > logger::make_sink (LogOptions const &log_opts, boost::filesystem::path const &full_log_dir, TAG const tag)
 
template<typename CONSOLE_SINK >
boost::shared_ptr< CONSOLE_SINK > logger::make_sink (LogOptions const &log_opts)
 
void logger::init (LogOptions const &log_opts)
 
void logger::set_once_fatal_func (FatalFunc fatal_func)
 
void logger::shutdown ()
 
std::istream & logger::operator>> (std::istream &in, Channels &channels)
 
std::ostream & logger::operator<< (std::ostream &out, Channels const &channels)
 
std::istream & logger::operator>> (std::istream &in, Severity &sev)
 
std::ostream & logger::operator<< (std::ostream &out, Severity const &sev)
 
template<typename... Ts>
Duration * logger::newDuration (Severity severity, Ts &&...args)
 
std::ostream & logger::operator<< (std::ostream &os, Duration const &duration)
 
std::ostream & logger::operator<< (std::ostream &os, DurationTree const &duration_tree)
 
boost::log::record_ostream & logger::operator<< (boost::log::record_ostream &os, DurationTreeMap::const_reference kv_pair)
 
void logger::logAndEraseDurationTree (std::thread::id const thread_id)
 
void logger::debugTimerNewThread (std::thread::id parent_thread_id)
 

Variables

bool g_enable_debug_timer {false}
 
std::atomic< FatalFunc > logger::g_fatal_func {nullptr}
 
std::once_flag logger::g_fatal_func_flag
 
bool logger::g_any_active_channels {false}
 
Severity logger::g_min_active_severity {Severity::FATAL}
 
std::mutex logger::gDurationTreeMapMutex
 
DurationTreeMap logger::gDurationTreeMap
 

Variable Documentation