Class Logger.

Inherits Garbage. Inherited by LogClient, SelfLogger and StderrLogger.

Abstract base class for things that log messages.

All subclasses of Logger must implement the send() virtual function, and take responsibility for correctly logging the lines of text that are passed to it.

A program creates one instance of a Logger subclass at startup and uses Logger::global() to process any messages sent to a Log object thereafter.


Stores the address of the newly-created Logger for global().

Reimplements Garbage::Garbage().

static Logger * Logger::global()

Returns a pointer to the global Logger.

EString Logger::name() const

Returns an application name. Subclasses must provide this name.

I don't like this mechanism. It's hacky. Only exists to let Log (in core) get at information held by the Server class (in server).

void Logger::send( const EString & id, Log::Severity s, const EString & m )

This virtual function logs the message m belonging to transaction id, whose severity is s, in a manner decided by the subclass.

id uniquely identifies a Log object.


This virtual destructor exists only to ensure that global() doesn't return a bad pointer.

This web page based on source code belonging to The Archiveopteryx Developers. All rights reserved.