Standard logging facilities (implementation). More...
#include "log.hpp"
#include <boost/date_time.hpp>
#include <map>
#include <sstream>
#include <ctime>
#include <mutex>
#include "global.hpp"
Go to the source code of this file.
Namespaces | |
lg | |
Typedefs | |
typedef std::map< std::string, int > | lg::domain_map |
Functions | |
static std::ostream | null_ostream (new null_streambuf) |
static std::ostream & | output () |
void | lg::timestamps (bool t) |
void | lg::precise_timestamps (bool pt) |
logger & | lg::err () |
logger & | lg::warn () |
logger & | lg::info () |
logger & | lg::debug () |
log_domain & | lg::general () |
bool | lg::set_log_domain_severity (const std::string &name, int severity) |
bool | lg::set_log_domain_severity (const std::string &name, const logger &lg) |
bool | lg::get_log_domain_severity (const std::string &name, int &severity) |
std::string | lg::list_logdomains (const std::string &filter) |
void | lg::set_strict_severity (int severity) |
void | lg::set_strict_severity (const logger &lg) |
bool | lg::broke_strict () |
std::string | lg::get_timestamp (const std::time_t &t, const std::string &format) |
std::string | lg::get_timespan (const std::time_t &t) |
static void | lg::print_precise_timestamp (std::ostream &out) noexcept |
std::stringstream & | lg::wml_error () |
Use this logger to send errors due to deprecated WML. More... | |
Variables | |
static int | indent = 0 |
static bool | timestamp = true |
static bool | precise_timestamp = false |
static std::mutex | log_mutex |
static std::ostream * | output_stream = nullptr |
static domain_map * | lg::domains |
static int | lg::strict_level_ = -1 |
static log_domain | lg::dom ("general") |
static bool | lg::strict_threw_ = false |
Standard logging facilities (implementation).
See also the command line switches –logdomains and –log-<level>="domain".
Definition in file log.cpp.
|
static |
Referenced by lg::logger::operator()().
|
static |
Definition at line 52 of file log.cpp.
References output_stream.
Referenced by BF_crypt(), wfl::builtins::DEFINE_WFL_FUNCTION(), lg::scope_logger::do_log_exit(), lg::logger::operator()(), php_crypt_blowfish_rn(), tod_manager::resolve_random(), and simple_wml::document::root().
|
static |
Definition at line 45 of file log.cpp.
Referenced by lg::scope_logger::do_log_entry(), lg::scope_logger::do_log_exit(), wfl::formula_function_expression::execute(), lg::logger::operator()(), lg::log_in_progress::operator|(), and gui2::dialogs::formula_debugger::pre_show().
|
static |
Definition at line 48 of file log.cpp.
Referenced by lg::log_in_progress::operator|().
|
static |
Definition at line 50 of file log.cpp.
Referenced by output(), lg::redirect_output_setter::redirect_output_setter(), and lg::redirect_output_setter::~redirect_output_setter().
|
static |
Definition at line 47 of file log.cpp.
Referenced by lg::log_in_progress::operator|(), and lg::precise_timestamps().
|
static |
Definition at line 46 of file log.cpp.
Referenced by lg::scope_logger::do_log_exit(), lg::logger::operator()(), gui2::dialogs::chat_log::model::stream_log(), and lg::timestamps().