45 #ifndef LOG_HPP_INCLUDED
46 #define LOG_HPP_INCLUDED
50 #define __func__ __FUNCTION__
59 #include <boost/date_time/posix_time/posix_time_types.hpp>
61 using boost::posix_time::ptime;
96 typedef std::pair<const std::string, int>
logd;
120 bool show_names =
true,
bool do_indent =
false)
const;
124 return severity_ > domain.
domain_->second;
185 #define log_scope(description) lg::scope_logger scope_logging_object__(lg::general(), description);
186 #define log_scope2(domain,description) lg::scope_logger scope_logging_object__(domain, description);
188 #define LOG_STREAM(level, domain) if (lg::level().dont_log(domain)) ; else lg::level()(domain)
191 #define LOG_STREAM_INDENT(level,domain) if (lg::level().dont_log(domain)) ; else lg::level()(domain, true, true)
bool dont_log(log_domain const &domain) const
std::string get_timestamp(const time_t &t, const std::string &format)
logger(char const *name, int severity)
std::ostream & operator()(log_domain const &domain, bool show_names=true, bool do_indent=false) const
scope_logger(log_domain const &domain, const char *str)
std::string get_name() const
~tredirect_output_setter()
std::pair< const std::string, int > logd
bool set_log_domain_severity(std::string const &name, int severity)
void do_log_entry(log_domain const &domain, const std::string &str)
log_domain(char const *name)
std::ostream * old_stream_
The previously set redirection.
scope_logger(log_domain const &domain, const std::string &str)
std::stringstream & wml_error()
Use this logger to send errors due to deprecated WML.
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
void set_strict_severity(int severity)
std::string get_timespan(const time_t &t)
bool get_log_domain_severity(std::string const &name, int &severity)
tredirect_output_setter(std::ostream &stream)
Constructor.
GLuint const GLchar * name
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
std::string list_logdomains(const std::string &filter)
Helper class to redirect the output of the logger in a certain scope.
GLsizei const GLcharARB ** string
void precise_timestamps(bool pt)