MprLogToFile Class Reference

Inheritance diagram for MprLogToFile:

MprLogListener MprLink List of all members.

Detailed Description

Log MPR messages to a file.

MprLogToFile is the default listener for log messages in the MPR. It will log trace at the desired level and automatically rotate log files when full. The log file specification passed to setLogSpec() contains the:

  • log path name
  • modules to log
  • maximum log file size before rotation
  • desired trace level
The log specification is:

        
fileName[[,moduleName]...][:level][.maxSize]

        

Module names (if specified) are internal MPR names such as socket. This allows you to log trace from only designated modules. The level must be between 0 and 9 with 9 being the most verbose. A good normal level is 2. The maxSize specification is the size of the logfile in MB before rotating. When rotated, the old file will have a ".old" appended.

Stability classification:
Evolving


Public Member Functions

void  insertAfter (MprLink *item)
  Insert after this member.

void  insertPrior (MprLink *item)
  Insert prior to this member.

  MprLogToFile ()
  Constructor.

int  start ()
  ~MprLogToFile ()
  Destructor.


Member Function Documentation

int MprLogToFile::start  )  [virtual]
 

Synopsis:
Called when logging commences.
Overview:
The start method will be invoked by the MPR when logging commences.
Stability classification:
Evolving.
Library:
libappWeb
See also:
MprLogListener, Mpr::addListener, mprError, mprLog

Reimplemented from MprLogListener.


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

© Mbedthis Software LLC, 2003-2004. All rights reserved. Mbedthis is a trademark of Mbedthis Software LLC.