OSTC Companion  3.0
Companion sofftware for H&W dive computers
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
LogAction Class Reference

Creates a Log event. More...

#include <Log.h>

Inheritance diagram for LogAction:
Inheritance graph
[legend]

Public Member Functions

 LogAction (Level level, const char *file, int line, const char *function)
 Starts a log line, with timestamp and source-stamp. More...
 
 ~LogAction ()
 Finish (and print) a log line. More...
 
LogActionoperator<< (char msg)
 Appends a single char to the log line. More...
 
LogActionoperator<< (unsigned char msg)
 Appends a single char to the log line. More...
 
LogActionoperator<< (const char *msg)
 Appends a C string to the log line. More...
 
LogActionoperator<< (const QString &msg)
 Appends a Qt's wide-char string to the log line, converted to Latin1. More...
 
LogActionoperator<< (const QStringList &msg)
 Appends a list of Qt's wide-char strings. More...
 
LogActionoperator<< (const QByteArray &msg)
 Appends a Qt's single-byte-string to the log line. More...
 
LogActionoperator<< (double value)
 Appends a float/double to the log line. More...
 
LogActionoperator<< (int value)
 Appends a signed int/short/byte to the log line. More...
 
LogActionoperator<< (unsigned int value)
 Appends an unsigned int/short/byte to the log line. More...
 
LogActionoperator<< (long value)
 Appends a signed long to the log line. More...
 
LogActionoperator<< (unsigned long value)
 Appends an unsigned long to the log line. More...
 
LogActionoperator<< (long long value)
 Appends a signed long long to the log line. More...
 
LogActionoperator<< (unsigned long long value)
 Appends an unsigned long long to the log line. More...
 
LogActionoperator<< (const void *ptr)
 Print any pointer as an Hex address: More...
 

Additional Inherited Members

- Public Types inherited from Log
enum  Level {
  LEVEL_NOERROR = 0,
  LEVEL_DEBUG,
  LEVEL_TRACE,
  LEVEL_INFO,
  LEVEL_WARNING,
  LEVEL_THROW,
  LEVEL_ERROR
}
 Log level: severity scale. More...
 
- Static Public Member Functions inherited from Log
static void autoLoad (int argc, char *argv[])
 Initialize the log system, by loading some XML config. More...
 
static void init (int &argc, char *argv[])
 Initialize the log system, without configurations. More...
 
static void close ()
 End the log systems, closing all appenders. More...
 
static QString applicationPath ()
 Utility to retrieve where the executable was installed. More...
 
static QString applicationName ()
 Utility to retrieve the executable's name. More...
 
- Public Attributes inherited from Log
const Level level
 Event's log level. More...
 
const QString file
 Source file that fired the log event. More...
 
const int line
 Source line that fired the log event. More...
 
const QString function
 Function (and class) that fired the event. More...
 
QString message
 The log message itself. More...
 
- Static Public Attributes inherited from Log
static Level minLevel = Log::LEVEL_WARNING
 Minimal error level to log. More...
 
- Protected Member Functions inherited from Log
 Log (Level level, const char *file, int line, const char *function)
 Constructor. More...
 

Detailed Description

Creates a Log event.

Uses object's destructor to send the Log into all registered log appenders.

Constructor & Destructor Documentation

LogAction::LogAction ( Level  level,
const char *  file,
int  line,
const char *  function 
)

Starts a log line, with timestamp and source-stamp.

LogAction::~LogAction ( )

Finish (and print) a log line.

Member Function Documentation

LogAction & LogAction::operator<< ( char  msg)

Appends a single char to the log line.

LogAction & LogAction::operator<< ( unsigned char  msg)

Appends a single char to the log line.

LogAction & LogAction::operator<< ( const char *  msg)

Appends a C string to the log line.

LogAction & LogAction::operator<< ( const QString &  msg)

Appends a Qt's wide-char string to the log line, converted to Latin1.

LogAction & LogAction::operator<< ( const QStringList &  msg)

Appends a list of Qt's wide-char strings.

LogAction & LogAction::operator<< ( const QByteArray &  msg)

Appends a Qt's single-byte-string to the log line.

LogAction & LogAction::operator<< ( double  value)

Appends a float/double to the log line.

LogAction & LogAction::operator<< ( int  value)

Appends a signed int/short/byte to the log line.

LogAction & LogAction::operator<< ( unsigned int  value)

Appends an unsigned int/short/byte to the log line.

LogAction & LogAction::operator<< ( long  value)

Appends a signed long to the log line.

LogAction & LogAction::operator<< ( unsigned long  value)

Appends an unsigned long to the log line.

LogAction & LogAction::operator<< ( long long  value)

Appends a signed long long to the log line.

LogAction & LogAction::operator<< ( unsigned long long  value)

Appends an unsigned long long to the log line.

LogAction & LogAction::operator<< ( const void *  ptr)

Print any pointer as an Hex address:


The documentation for this class was generated from the following files: