OmniSciDB  471d68cefb
 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/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/smart_ptr/weak_ptr.hpp>
#include <boost/variant.hpp>
#include <atomic>
#include <cstdlib>
#include <iostream>
#include <mutex>
#include <regex>
#include "Shared/nvtx_helpers.h"
+ Include dependency graph for Logger.cpp:

Go to the source code of this file.

Classes

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::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
 
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)
 
ChannelLogger & logger::anonymous_namespace{Logger.cpp}::get_channel_logger (Channel const channel)
 
QueryId logger::query_id ()
 
QidScopeGuard logger::set_thread_local_query_id (QueryId const query_id)
 
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::string *json_str)
 
void logger::debug_timer_new_thread (ThreadId parent_thread_id)
 
ThreadId logger::thread_id ()
 

Variables

bool g_enable_debug_timer {false}
 
std::once_flag logger::g_fatal_func_flag
 
bool logger::g_any_active_channels {false}
 
Severity logger::g_min_active_severity {Severity::FATAL}
 
thread_local std::atomic< QueryId > logger::g_query_id {0}
 
std::mutex logger::g_duration_tree_map_mutex
 
DurationTreeMap logger::g_duration_tree_map
 
std::atomic< ThreadId > logger::g_next_thread_id {0}
 
thread_local ThreadId const logger::g_thread_id = g_next_thread_id++
 

Variable Documentation