My Project
Public Member Functions | Public Attributes | List of all members
ParaScripting::ParaServiceLogger Class Reference

service logger More...

#include <ParaScriptingGlobal.h>

Public Member Functions

 ParaServiceLogger (ParaEngine::CServiceLogger_ptr &logger)
 
void log (int level, const object &message)
 log to the current logger
 
int GetLevel ()
 Returns the assigned Level. More...
 
void SetLevel (const int level1)
 set level of this logger. More...
 
bool IsEnabledFor (int level)
 Check whether this logger is enabled for a given Level passed as parameter. More...
 
void SetAppendMode (bool bAppendToExistingFile)
 by default, append mode is enabled in server mode, and disabled in client build. More...
 
void SetLogFile (const char *sFileName)
 change the log file. More...
 
void SetForceFlush (bool bForceFlush)
 if true we will flush the new log to file immediately. More...
 

Public Attributes

ParaEngine::CServiceLogger_ptr m_logger_ptr
 

Detailed Description

service logger

Member Function Documentation

§ GetLevel()

int ParaServiceLogger::GetLevel ( )

Returns the assigned Level.

Returns
Level - the assigned Level

§ IsEnabledFor()

bool ParaServiceLogger::IsEnabledFor ( int  level)

Check whether this logger is enabled for a given Level passed as parameter.

Returns
bool True if this logger is enabled for level. It just checks (level>=this->m_level)

§ SetAppendMode()

void ParaServiceLogger::SetAppendMode ( bool  bAppendToExistingFile)

by default, append mode is enabled in server mode, and disabled in client build.

Note
: only call this function when no log is written before using the logger.

§ SetForceFlush()

void ParaServiceLogger::SetForceFlush ( bool  bForceFlush)

if true we will flush the new log to file immediately.

otherwise, flush operation is determined by the system. default to true for client log and false for service log.

Note
: only call this function when no log is written before using the logger.

§ SetLevel()

void ParaServiceLogger::SetLevel ( const int  level1)

set level of this logger.

§ SetLogFile()

void ParaServiceLogger::SetLogFile ( const char *  sFileName)

change the log file.

Note
: only call this function when no log is written before using the logger.
Parameters
sFileNamesuch as "log/test.log"

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