Quick Links:

bal | bbl | bdl | bsl

Public Member Functions

ball::Log_Formatter Class Reference

#include <ball_log.h>

List of all members.

Public Member Functions

 Log_Formatter (const Category *category, const char *fileName, int lineNumber, int severity)
 ~Log_Formatter ()
char * messageBuffer ()
Recordrecord ()
const Categorycategory () const
int messageBufferLen () const
const Recordrecord () const
int severity () const

Detailed Description

This class provides an aggregate of several objects relevant to the logging of a message via the printf-style macros:

      - record to be logged
      - category to which to log the record
      - severity at which to log the record
      - buffer in which the user log message is formatted

As a side-effect of creating an object of this class, the record is constructed, and the buffer is obtained. As a side-effect of destroying the object, the record is formatted, using the buffer, and logged.

This class should not be used directly by client code. It is an implementation detail of the macros provided by this component.

See Component ball_log


Constructor & Destructor Documentation

ball::Log_Formatter::Log_Formatter ( const Category category,
const char *  fileName,
int  lineNumber,
int  severity 
)

Create a logging formatter that holds (1) the specified category and severity, (2) a record that is created from the specified fileName and lineNumber, and (3) a buffer into which the log message is formatted.

ball::Log_Formatter::~Log_Formatter (  ) 

Log the record held by this logging formatter to the held category (as returned by category) at the held severity (as returned by severity), and destroy this logging formatter.


Member Function Documentation

char* ball::Log_Formatter::messageBuffer (  ) 

Return the address of the modifiable buffer held by this logging formatter. The address remains valid until this logging formatter is destroyed.

Record* ball::Log_Formatter::record (  ) 

Return the address of the modifiable log record held by this logging formatter. The address remains valid until this logging formatter is destroyed.

const Category* ball::Log_Formatter::category (  )  const

Return the address of the non-modifiable category held by this logging formatter.

int ball::Log_Formatter::messageBufferLen (  )  const

Return the length (in bytes) of the buffer held by this logging formatter.

const Record* ball::Log_Formatter::record (  )  const

Return the address of the non-modifiable log record held by this logging formatter. The address remains valid until this logging formatter is destroyed.

int ball::Log_Formatter::severity (  )  const

Return the severity held by this logging formatter.


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