OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Logger.cpp File Reference
#include "Logger.h"
#include <rapidjson/document.h>
#include <rapidjson/stringbuffer.h>
#include <rapidjson/writer.h>
#include <boost/algorithm/string.hpp>
#include <boost/config.hpp>
#include <boost/filesystem.hpp>
#include <boost/log/common.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/program_options.hpp>
#include <boost/smart_ptr/weak_ptr.hpp>
#include <boost/variant.hpp>
#include <atomic>
#include <cstdlib>
#include <iostream>
#include <mutex>
#include <regex>
#include "Shared/SysDefinitions.h"
#include "Shared/nvtx_helpers.h"
+ Include dependency graph for Logger.cpp:

Go to the source code of this file.

Classes

class  logger::Collector
 
struct  logger::DebugTimerParams
 
class  logger::Duration
 
class  logger::DurationTree
 
struct  logger::GetDepth
 
class  logger::JsonEncoder
 
struct  logger::EraseDurationTrees
 Depth-first search and erase all DurationTrees. Not thread-safe. More...
 

Namespaces

 logger
 
 logger::anonymous_namespace{Logger.cpp}
 

Typedefs

using logger::ChannelLogger = boost::log::sources::channel_logger_mt< Channel >
 
using logger::SeverityLogger = boost::log::sources::severity_logger_mt< Severity >
 
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::DurationTreeNodes = std::deque< DurationTreeNode >
 
using logger::DurationTreeMap = std::unordered_map< ThreadId, std::unique_ptr< DurationTree >>
 

Functions

 logger::BOOST_LOG_GLOBAL_LOGGER_CTOR_ARGS (gChannelLogger_IR, ChannelLogger,(keywords::channel=IR)) BOOST_LOG_GLOBAL_LOGGER_CTOR_ARGS(gChannelLogger_PTX
 
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 (boost::shared_ptr< Collector > &collector, LogOptions const &log_opts, fs::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 ()
 
void logger::anonymous_namespace{Logger.cpp}::unquote (std::string &str)
 
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)
 
thread_local ThreadLocalIds logger::anonymous_namespace{Logger.cpp}::g_thread_local_ids (0, 0)
 
ChannelLogger & logger::anonymous_namespace{Logger.cpp}::get_channel_logger (Channel const channel)
 
Duration * logger::newDuration (DebugTimerParams const debug_timer_params)
 
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::string *json_str)
 
void logger::debug_timer_new_thread (ThreadId const parent_thread_id)
 
RequestId logger::request_id ()
 
ThreadId logger::thread_id ()
 
ThreadLocalIds logger::thread_local_ids ()
 
RequestId logger::set_new_request_id ()
 
void logger::set_request_id (RequestId const request_id)
 
fs::path logger::get_log_dir_path ()
 

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}
 
static fs::path logger::g_log_dir_path
 
std::atomic< RequestId > logger::anonymous_namespace{Logger.cpp}::g_next_request_id {1}
 
std::atomic< ThreadId > logger::anonymous_namespace{Logger.cpp}::g_next_thread_id {1}
 
std::mutex logger::g_duration_tree_map_mutex
 
DurationTreeMap logger::g_duration_tree_map
 

Variable Documentation