Mini application server API for C++.

 Overview   Project   Class   Tree   Deprecated   Index 
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

base
Class CzzLog

   in zz_log.h

class CzzLog

Logger.

   ;Sample configuration file:
   [Default]
   ;Level can be: 
   ;0-Trace, 1-Debug, 2-Info, 3-Warning, 4-Error
   level=0
   ;destination can be: 
   ;0-Messagebox, 1-File, 2-Debug console, 4-Stderr, 5-Eventlog, 6-NULL
   destination=1
   filename=..\logs\default.log
   lock=0
   [Myname]
   level=2
   destination=5
   filename=..\logs\myname.log
   lock=0
   

Author:
Toni Thomsson, toni@tonjac.org

Constructor Summary
CzzLog( const CzzString& app )
          Create a logger.
CzzLog( const CzzString& app, const CzzString& ini )
          Create a logger
CzzLog( CzzLog& obj )
          Copy constructor
CzzLog( void )
          Create a logger with the name "default"
~CzzLog()
          
 
Method Summary
 HLOG GetHandle()
          Log handle
 LOGRET Print( const LOGLEVEL Level, const int ErrorCode, const int Row, const char* Module, const char* Message,... )
          Log a message.
 

Constructor Detail

CzzLog

public CzzLog( const CzzString& app );
Create a logger. Use log.ini in current directory to configure log.
Parameters:
app - Name

CzzLog

public CzzLog( const CzzString& app, const CzzString& ini );
Create a logger
Parameters:
app - Name
ini - Path to configuration file

CzzLog

public CzzLog( CzzLog& obj );
Copy constructor

CzzLog

public CzzLog( void );
Create a logger with the name "default"

~CzzLog

public ~CzzLog();


Method Detail

GetHandle

public HLOG GetHandle();
Log handle

Print

public LOGRET Print( const LOGLEVEL Level, const int ErrorCode, const int Row, const char* Module, const char* Message,... );
Log a message. You can use the following macros for the three first arguments: _DEBUGPARAMS, _TRACEPARAMS, _INFOPARAMS, _WARNINGPARAMS. Use LL_ERROR for errors.
Parameters:
Level - Loglevel
ErrorCode - Error code
Row - Line number
Module - File or module
Message - Message/format, see printf()
... - arguments to format string, see printf()
See Also:
CzzLogException

 Overview   Project   Class   Tree   Deprecated   Index 
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD