Namespaces | Typedefs | Functions | Variables

log.cpp File Reference

Standard logging facilities (implementation). More...

#include "global.hpp"
#include "SDL.h"
#include "log.hpp"
#include "foreach.hpp"
#include <map>
#include <sstream>
#include <ctime>
Include dependency graph for log.cpp:

Go to the source code of this file.

Namespaces

namespace  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)
bool lg::set_log_domain_severity (std::string const &name, int severity)
std::string lg::list_logdomains (const std::string &filter)
std::string lg::get_timestamp (const time_t &t, const std::string &format)

Variables

static int indent = 0
static bool timestamp = true
static std::ostream * output_stream = NULL
static domain_map * lg::domains
logger lg::err ("error", 0)
logger lg::warn ("warning", 1)
logger lg::info ("info", 2)
logger lg::debug ("debug", 3)
log_domain lg::general ("general")
std::stringstream lg::wml_error
 Use this logger to send errors due to deprecated WML.

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 std::ostream null_ostream ( new  null_streambuf  )  [static]
static std::ostream& output (  )  [static]

Definition at line 51 of file log.cpp.

References output_stream.

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

Here is the caller graph for this function:


Variable Documentation

int indent = 0 [static]
std::ostream* output_stream = NULL [static]
bool timestamp = true [static]

Definition at line 47 of file log.cpp.

Referenced by lg::scope_logger::do_log_exit(), and lg::logger::operator()().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:04:36 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs