MprLogToFile Class Reference

Log MPR messages to a file. More...

Inheritance diagram for MprLogToFile:

MprLogListener MprLink

List of all members.

Public Member Functions

MprListgetList ()
 Destructor.
void insertAfter (MprLink *item)
 Return the owning list.
void insertPrior (MprLink *item)
 Insert prior to this member.
 MprLogToFile ()
 Constructor.
int start ()
 ~MprLogToFile ()
 Destructor.


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

Member Function Documentation

void MprLink::insertAfter ( MprLink item  )  [inline, inherited]

Return the owning list.

Insert after this member

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:

© Embedthis Software LLC, 2003-2009. All rights reserved. Embedthis is a trademark of Embedthis Software LLC.