Public Member Functions

CdcLogger Class Reference

This simple class is to handle the log file. More...

#include <DcLogger.h>

List of all members.

Public Member Functions

 CdcLogger ()
 Constructor - Takes the Log Level and Log Period from the configuration file.
virtual ~CdcLogger ()
 Destructor - Just close the log file.
void PrintString (CdcString str, int level, bool console)
 This function prints a string to the log file.
void Init ()
 I have To initialize the class after I initialize CdcParameters.

Detailed Description

This simple class is to handle the log file.

It logs data according to the Log Level setting in the configuration file. It replaces the log file every day, week, month or never, also according to the Log configuration. The class prints to a file, and if the application is running in console mode, it prints to the console as well. It does not prints to the console the Requests data though.

Author:
Erez Bibi
Version:
1.0

Definition at line 55 of file DcLogger.h.


Constructor & Destructor Documentation

CdcLogger::CdcLogger (  ) [inline]

Constructor - Takes the Log Level and Log Period from the configuration file.

Definition at line 92 of file DcLogger.h.

virtual CdcLogger::~CdcLogger (  ) [inline, virtual]

Destructor - Just close the log file.

Definition at line 98 of file DcLogger.h.


Member Function Documentation

void CdcLogger::Init (  )

I have To initialize the class after I initialize CdcParameters.

but if CdcParameters fails to read the configuration files, I still need to be able to print a message on the console. So the constructor just makes this class ready to print general messages to the console, and this function does the rest of the initialization.

Definition at line 91 of file DcLogger.cpp.

void CdcLogger::PrintString ( CdcString  str,
int  level,
bool  console 
)

This function prints a string to the log file.

Parameters:
strThe string to print.
levelThe Log Level of this string. It will not print the string if the level is higher the the general Log Level.
consoleTrue if the application is running in a console mode.

Definition at line 73 of file DcLogger.cpp.


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