Public Member Functions | Static Public Member Functions

SCS::Log Class Reference

A stream-based logger using any LogWriter. A Log instance corresponds to ONE log entry. More...

#include <log.h>

List of all members.

Public Member Functions

 Log ()
Logoperator<< (int i)
Logoperator<< (uint32_t u32)
Logoperator<< (float f)
Logoperator<< (double d)
Logoperator<< (char c)
Logoperator<< (const std::string &s)
Logoperator<< (Log &(*f)(Log &))

Static Public Member Functions

static LogInfo (Log &log)
static LogWarn (Log &log)
static LogError (Log &log)
static LogFail (Log &log)
static Logendl (Log &log)

Detailed Description

A stream-based logger using any LogWriter. A Log instance corresponds to ONE log entry.

Creating an instance provides the stream to which a log message is written. Specifying severity level and Log::endl are mandatory.

 Log() << Log::Error << "This is an error" << Log::endl;
 Log() << Log::Info << "This is an information about " << some_integer << Log::endl 
Author:
(c) 2009,2010 by Philipp Münzel
Version:
1.3

Constructor & Destructor Documentation

SCS::Log::Log ( )

create a new Logstream for ONE new message


Member Function Documentation

static Log& SCS::Log::endl ( Log log) [static]

Terminate the log stream. This is mandatory!

static Log& SCS::Log::Error ( Log log) [static]

Indicate the following message has severity Error

static Log& SCS::Log::Fail ( Log log) [static]

Indicate the following message has severity Failure

static Log& SCS::Log::Info ( Log log) [static]

Indicate the following message has severity Information

Log& SCS::Log::operator<< ( double  d)

Log a double.

Parameters:
d
Log& SCS::Log::operator<< ( const std::string &  s)

Log a string.

Parameters:
s
Log& SCS::Log::operator<< ( uint32_t  u32)

Log an unsigned 32 bit integer (CAN Id are stored in this format)

Parameters:
u32
Log& SCS::Log::operator<< ( int  i)

Log an integer.

Parameters:
i
Log& SCS::Log::operator<< ( float  f)

Log a float.

Parameters:
f
Log& SCS::Log::operator<< ( char  c)

Log a char

Parameters:
c
static Log& SCS::Log::Warn ( Log log) [static]

Indicate the following message has severity Warnining


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