ARC SDK
Public Member Functions | Protected Member Functions | Protected Attributes | Friends
Arc::LogDestination Class Referenceabstract

A base class for log destinations. More...

#include <arc/Logger.h>

Inheritance diagram for Arc::LogDestination:
Arc::LogFile Arc::LogStream

Public Member Functions

virtual void log (const LogMessage &message)=0
 Logs a LogMessage to this LogDestination. More...
 
void setFormat (const LogFormat &newformat)
 Set format for this log destination. More...
 
void setPrefix (const std::string &prefix)
 Set a prefix for this log destination to be logged before messages. More...
 

Protected Member Functions

 LogDestination ()
 Default constructor. Protected since subclasses should be used instead. More...
 

Protected Attributes

LogFormat format
 Format to use in this LogDestination. More...
 
std::string prefix
 Prefix to use in this log destination. More...
 

Friends

std::ostream & operator<< (std::ostream &os, const LogDestination &dest)
 Sets iword and pword for format and prefix. More...
 

Detailed Description

A base class for log destinations.

This class defines an interface for LogDestinations. LogDestination objects will typically contain synchronization mechanisms and should therefore never be copied. If setlocale() has been called with a supported locale, log messages will be logged in that locale.

Constructor & Destructor Documentation

Arc::LogDestination::LogDestination ( )
protected

Default constructor. Protected since subclasses should be used instead.

Member Function Documentation

virtual void Arc::LogDestination::log ( const LogMessage message)
pure virtual

Logs a LogMessage to this LogDestination.

Implemented in Arc::LogFile, and Arc::LogStream.

void Arc::LogDestination::setFormat ( const LogFormat newformat)

Set format for this log destination.

void Arc::LogDestination::setPrefix ( const std::string &  prefix)

Set a prefix for this log destination to be logged before messages.

The prefix is prepended to messages in all formats except EmptyFormat.

Since
Added in 4.0.0.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const LogDestination dest 
)
friend

Sets iword and pword for format and prefix.

Field Documentation

LogFormat Arc::LogDestination::format
protected

Format to use in this LogDestination.

Java interface deviation
The member is only accessible through the getformat and setformat methods in the Java interface
std::string Arc::LogDestination::prefix
protected

Prefix to use in this log destination.

Since
Added in 4.0.0.
Java interface deviation
The member is only accessible through the getprefix and setprefix methods in the Java interface

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