CARMA C++
carma::util::SyslogLayout Class Reference

Syslog layout class for CARMA logging. More...

#include <carma/util/Logger.h>

Inherits Layout.

Public Member Functions

virtual std::string format (const log4cpp::LoggingEvent &event)
 Formats the LoggingEvent in SyslogLayout style:
"Time Identity: {Year} {Priority} {Category} {Nested Diagnostic Context} {Message}", where
Time is the timestamp added by the Linux syslog daemon,
Year is the current year, needed because syslog does not include year in its timestamp. More...
 
 SyslogLayout ()
 Default constructor for SyslogLayout. More...
 
virtual ~SyslogLayout ()
 Destructor for SyslogLayout. More...
 

Detailed Description

Syslog layout class for CARMA logging.

Definition at line 203 of file Logger.h.

Constructor & Destructor Documentation

carma::util::SyslogLayout::SyslogLayout ( )

Default constructor for SyslogLayout.

virtual carma::util::SyslogLayout::~SyslogLayout ( )
virtual

Destructor for SyslogLayout.

Member Function Documentation

virtual std::string carma::util::SyslogLayout::format ( const log4cpp::LoggingEvent &  event)
virtual

Formats the LoggingEvent in SyslogLayout style:
"Time Identity: {Year} {Priority} {Category} {Nested Diagnostic Context} {Message}", where
Time is the timestamp added by the Linux syslog daemon,
Year is the current year, needed because syslog does not include year in its timestamp.


Identity is the parameter passed to getSysLogger(),
Nested Diagnostic Context is a context specific message,
Priority corresponds to the priority levels used by syslog(3)

Parameters
eventThe Logging Event generated by the Category method which passed the original log message.
Returns
The log message formatted according to SyslogLayout rules.
See Also
carma::util::Time::computeCurrentFrame()
log4cpp::LoggingEvent

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