The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Namespaces | Typedefs | Functions | Variables
log.cpp File Reference

Standard logging facilities (implementation). More...

#include "game_errors.hpp"
#include "global.hpp"
#include "log.hpp"
#include <boost/date_time.hpp>
#include <map>
#include <sstream>
#include <ctime>
Include dependency graph for log.cpp:

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
boost::posix_time::time_facet 
facet ("%Y%m%d %H:%M:%S%F ")
 
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 (std::string const &name, int severity)
 
bool lg::set_log_domain_severity (std::string const &name, const logger &lg)
 
bool lg::get_log_domain_severity (std::string const &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 time_t &t, const std::string &format)
 
std::string lg::get_timespan (const time_t &t)
 
static void lg::print_precise_timestamp (std::ostream &out)
 
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::ostream * output_stream = nullptr
 
static domain_map * lg::domains
 
static int lg::strict_level_ = -1
 
static bool lg::strict_threw_ = false
 

Detailed Description

Standard logging facilities (implementation).

See also the command line switches –logdomains and –log-<level>="domain".

Definition in file log.cpp.

Function Documentation

static boost::posix_time::time_facet facet ( "%Y%m%d %H:%M:%S%F "  )
static
static std::ostream null_ostream ( new  null_streambuf)
static

Referenced by lg::logger::operator()().

static std::ostream& output ( )
static

Definition at line 52 of file log.cpp.

References output_stream.

Referenced by lg::logger::operator()().

Variable Documentation

int indent = 0
static
std::ostream* output_stream = nullptr
static
bool precise_timestamp = false
static

Definition at line 47 of file log.cpp.

Referenced by lg::logger::operator()(), and lg::precise_timestamps().

bool timestamp = true
static