core::Log Class Reference

`#include <Log.h>`

Inheritance diagram for core::Log:
[legend]
Collaboration diagram for core::Log:
[legend]

## Public Member Functions

| Log (ConsoleServer *consoleServer)
| Log (File *logFile)
| Log (int level)
| ~Log ()

## Public Attributes

bool | output = false
Public Attributes inherited from core::Object
std::string | name
std::string | tag

## Static Public Attributes

static ConsoleServer * | consoleServer = NULL
static File * | logFile = NULL
static int | seq = 0

## Detailed Description

Log

Provides easy to access and use logging features to maintain a history of activity and provide information for activity debugging.

## Constructor & Destructor Documentation

## Log() [1/3]

core::Log::Log | ( | ConsoleServer * | consoleServer | ) |

Constructor method that accepts a pointer to the applications console server. This enables the Log object to send new log messages to the connected console sessions.

Parameters

  consoleServer | a pointer to the console server that will be used to echo log entries.

## Log() [2/3]

core::Log::Log | ( | File * | logFile | ) |

Constructor method accepts a file object that will be used to echo all log entries. This provides a permanent disk file record of all logged activity.

## Log() [3/3]

core::Log::Log | ( | int | level | ) |

Constructor method that is used to send a message to the log.

Parameters

  level | the logging level to associate with this message.

To send log message: Log(LOG_INFO) << "This is a log message.";

## ~Log()

core::Log::~Log | ( |  | ) |

The destructor for the log object.

## Member Data Documentation

## consoleServer

ConsoleServer * core::Log::consoleServer = NULL

static

Set the consoleServer to point to the instantiated ConsoleServer object for the application.

## logFile

File * core::Log::logFile = NULL

static

Specify a File object where the log entries will be written as a permanent record to disk.

## seq

int core::Log::seq = 0

static

A meaningless sequenctial number that starts from - at the beginning of the logging process.

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

- /home/bradarant/barant/ServerCore/Log.h
- /home/bradarant/barant/ServerCore/Log.cpp