Stellarium 0.11.4
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure

StelLogger Class Reference

Class wit only static members used to manage logging for Stellarium. More...

#include <StelLogger.hpp>

List of all members.

Static Public Member Functions

static void init (const QString &logFilePath)
 Create and initialize the log file.
static void deinit ()
 Deinitialize the log file.
static void debugLogHandler (QtMsgType, const char *)
 Handler for qDebug() and friends. Writes message to log file at $USERDIR/log.txt and echoes to stderr.
static const QString & getLog ()
 Return a copy of text of the log file.
static QString getLogFileName ()
static void writeLog (QString msg)
 Write the message plus a newline to the log file at $USERDIR/log.txt.

Detailed Description

Class wit only static members used to manage logging for Stellarium.

The debugLogHandler() method allow to defined it as a standard Qt messages handler which is then used by qDebug, qWarning and qFatal.


Member Function Documentation

static void StelLogger::debugLogHandler ( QtMsgType  ,
const char *   
) [static]

Handler for qDebug() and friends. Writes message to log file at $USERDIR/log.txt and echoes to stderr.

static void StelLogger::deinit (  )  [static]

Deinitialize the log file.

Must be called after init() was called.

static const QString& StelLogger::getLog (  )  [inline, static]

Return a copy of text of the log file.

static void StelLogger::init ( const QString &  logFilePath  )  [static]

Create and initialize the log file.

Prepend system information before any debugging output.

static void StelLogger::writeLog ( QString  msg  )  [static]

Write the message plus a newline to the log file at $USERDIR/log.txt.

Parameters:
msg message to write. If you call this function the message will be only in the log file, not on the console like with qDebug().
Generated on Sat Aug 25 22:13:32 2012 for Stellarium by  doxygen 1.6.3