BCLog Class Reference

#include <BCLog.h>

List of all members.


Detailed Description

A class for managing log messages.

Author:
Daniel Kollar

Kevin Kröninger

Version:
1.0
Date:
08.2008 This class manages log messages for printing on the screen and into a log file

Definition at line 34 of file BCLog.h.


Public Types

enum  LogLevel {
  debug, detail, summary, warning,
  nothing
}

Public Member Functions

 BCLog ()
 ~BCLog ()

Static Public Member Functions

static void CloseLog ()
static int GetHIndex ()
static BCLog::LogLevel GetMinimumLogLevelFile ()
static BCLog::LogLevel GetMinimumLogLevelScreen ()
static const char * GetVersion ()
static void OpenLog ()
static void OpenLog (const char *filename)
static void OpenLog (const char *filename, BCLog::LogLevel loglevelfile, BCLog::LogLevel loglevelscreen)
static void Out (const char *message)
static void Out (BCLog::LogLevel loglevelfile, BCLog::LogLevel loglevelscreen, const char *message)
static void SetMinimumLogLevelFile (BCLog::LogLevel loglevel)
static void SetMinimumLogLevelScreen (BCLog::LogLevel loglevel)
static void StartupInfo ()

Static Private Member Functions

static const char * ToString (BCLog::LogLevel)

Static Private Attributes

static int fHindex = 0
static BCLog::LogLevel fMinimumLogLevelFile = BCLog::debug
static BCLog::LogLevel fMinimumLogLevelScreen = BCLog::summary
static std::ofstream fOutputStream
static const char * fVersion = BAT_VERSION

Member Enumeration Documentation

Enumerator for the amount of details to put into the log file Log levels: debug : Lowest level of information detail : Details of functions, etc. summary : Results warning : Warning messages nothing : Not written into file

Enumerator:
debug 
detail 
summary 
warning 
nothing 

Definition at line 50 of file BCLog.h.


Constructor & Destructor Documentation

BCLog::BCLog (  ) 

A constructor.

Definition at line 24 of file BCLog.cxx.

BCLog::~BCLog (  ) 

A destructor.

Definition at line 35 of file BCLog.cxx.


Member Function Documentation

void BCLog::CloseLog (  )  [static]

Closes the log file

Definition at line 88 of file BCLog.cxx.

static int BCLog::GetHIndex (  )  [inline, static]

Returns:
unique number for use in histogram name string

Definition at line 139 of file BCLog.h.

static BCLog::LogLevel BCLog::GetMinimumLogLevelFile (  )  [inline, static]

Returns the minimum log level for file output.

Returns:
The log level

Definition at line 70 of file BCLog.h.

static BCLog::LogLevel BCLog::GetMinimumLogLevelScreen (  )  [inline, static]

Returns the minimum log level for screen output.

Returns:
The log level

Definition at line 77 of file BCLog.h.

static const char* BCLog::GetVersion (  )  [inline, static]

Returns:
string containing the version number

Definition at line 133 of file BCLog.h.

void BCLog::OpenLog (  )  [static]

Definition at line 79 of file BCLog.cxx.

void BCLog::OpenLog ( const char *  filename  )  [static]

Definition at line 70 of file BCLog.cxx.

void BCLog::OpenLog ( const char *  filename,
BCLog::LogLevel  loglevelfile,
BCLog::LogLevel  loglevelscreen 
) [static]

Opens log file and sets minimum log levels for file and screen output.

Parameters:
filename The log filename
loglevelfile The minimum log level for file output
loglevelscreen The minimum log level for screen output

Definition at line 40 of file BCLog.cxx.

void BCLog::Out ( const char *  message  )  [static]

Definition at line 122 of file BCLog.cxx.

void BCLog::Out ( BCLog::LogLevel  loglevelfile,
BCLog::LogLevel  loglevelscreen,
const char *  message 
) [static]

Definition at line 97 of file BCLog.cxx.

static void BCLog::SetMinimumLogLevelFile ( BCLog::LogLevel  loglevel  )  [inline, static]

Sets the minimum log level for file output.

Parameters:
loglevel The log level

Definition at line 86 of file BCLog.h.

static void BCLog::SetMinimumLogLevelScreen ( BCLog::LogLevel  loglevel  )  [inline, static]

Sets the minimum log level for screen output.

Parameters:
loglevel The log level

Definition at line 93 of file BCLog.h.

void BCLog::StartupInfo (  )  [static]

Writes startup information onto screen and into a logfile

Definition at line 131 of file BCLog.cxx.

const char * BCLog::ToString ( BCLog::LogLevel  loglevel  )  [static, private]

Converts a log level to a string

Definition at line 159 of file BCLog.cxx.


Member Data Documentation

int BCLog::fHindex = 0 [static, private]

Global histogram counter

Definition at line 172 of file BCLog.h.

BCLog::LogLevel BCLog::fMinimumLogLevelFile = BCLog::debug [static, private]

The minimum file log level

Definition at line 152 of file BCLog.h.

BCLog::LogLevel BCLog::fMinimumLogLevelScreen = BCLog::summary [static, private]

The minimum screen log level

Definition at line 157 of file BCLog.h.

std::ofstream BCLog::fOutputStream [static, private]

The output stream for the file log

Definition at line 162 of file BCLog.h.

const char * BCLog::fVersion = BAT_VERSION [static, private]

BAT version number

Definition at line 140 of file BCLog.h.


Generated on Mon Sep 15 17:04:29 2008 for Bayesian Analysis Toolkit by  doxygen 1.5.6