23#ifndef SRC_HEADERS_GX_LOGGING_H_
24#define SRC_HEADERS_GX_LOGGING_H_
26#include <glib/gi18n.h>
27#include <glibmm/dispatcher.h>
28#include <boost/thread/mutex.hpp>
29#include <boost/format.hpp>
44 typedef sigc::signal<void, const std::string&, MsgType, bool>
msg_signal;
57 std::string
format(
const char* func,
const std::string& msg);
66 void print(
const char* func,
const std::string& msg,
MsgType msgtype);
78inline void gx_print_error(
const char* fnc,
const boost::basic_format<char>& msg) {
82inline void gx_print_fatal(
const char* fnc,
const boost::basic_format<char>& msg) {
86inline void gx_print_info(
const char* fnc,
const boost::basic_format<char>& msg) {
94 virtual const char*
what()
const throw() {
117 sigc::signal<void,std::string>&
signal_msg() {
return message; }
sigc::signal< void, std::string > & signal_msg()
static GxExit & get_instance()
sigc::signal< void, bool > exit_sig
sigc::signal< void, std::string > message
sigc::signal< void, bool > & signal_exit()
void fatal_msg(const std::string &msg)
void exit_program(std::string msg="", int errcode=1)
GxFatalError(std::string m)
virtual const char * what() const
GxFatalError(boost::basic_format< char > &m)
msg_signal & signal_message()
void print(const char *func, const std::string &msg, MsgType msgtype)
static GxLogger & get_logger()
sigc::signal< void, const std::string &, MsgType, bool > msg_signal
std::string format(const char *func, const std::string &msg)
std::list< logmsg * > msglist
Glib::Dispatcher * got_new_msg
friend class GxLoggerGuard
void print(const std::string &formatted_msg, MsgType msgtype)
void gx_print_error(const char *, const std::string &)
void gx_print_fatal(const char *, const std::string &)
void gx_print_warning(const char *, const std::string &)
void gx_print_info(const char *, const std::string &)
void gx_print_logmsg(const char *, const std::string &, GxLogger::MsgType)
logmsg(std::string m, MsgType t, bool p)