17 #include <QtCore/QMutex>
53 static void add(
Level level,
const std::string& line);
void load()
load the logging settings from the .ini file
static Log & ref()
retrive a reference to the singleton instance
static void loadSettings()
load the logging settings from the .ini file
std::string _filename
the filename of the log file
Level
the logging levels available
static std::tr1::shared_ptr< Log > _instance
the instance
static Level _loggingLevel
the used logging level
static void add(Level level, const std::string &line)
add a string to the log
static const char * _level2string[]
map the level to a string
static QMutex _lock
mutex to lock the singleton
a logger for logging debug and info messages
void addline(Level level, const std::string &line)
add a string to the log
static std::string filename()
return the name of the log file
std::string _buffer
a buffer for concatinating the message
std::ofstream _log
the stream that we write the log messages to