/home/mob/svn/appWeb/1.2.3/mpr/log.cpp File Reference
Detailed Description
Diagnostic error, trace and logging facility.
This module provides a flexible trace and error logging mechanism for development, debugging and run-time fault-finding.
This modules is thread-safe.
#include "mpr.h"
|
Functions |
void | mprLog (int level, MprLogModule *module, char *fmt,...) |
void | mprError (char *file, int line, int flags, char *fmt,...) |
Function Documentation
void mprError |
( |
char * |
file, |
|
|
int |
line, |
|
|
int |
flags, |
|
|
char * |
fmt, |
|
|
... |
|
|
) |
|
|
|
- Synopsis:
- Log an error message.
- Overview:
- Send an error message to the MPR debug logging subsystem. The message will be passed to any registered listeners (see addListener).
- Parameters:
-
file | File name of the source containing the error. |
line | Line number in the source containing the error. |
flags | Error flags. Possible values are: |
- MPR_TRAP Trap to the debugger.
- MPR_LOG Log the message to the log file.
- MPR_USER Log and display visibly to the user (if not headless).
- MPR_ALERT Log and send an alert to the user (not implemented).
- Parameters:
-
fmt | Printf style format string. Variable number of arguments to |
... | Variable number of arguments for printf data |
- Returns:
- Returns zero if successful. Otherwise a negative MPR error code.
- Remarks:
- mprError will log the message and invoke all registered MprLogListeners.
- Stability Classification:
- Evolving.
- Library:
- libappWeb
- See also:
- MprLogListener, mprLog
|
void mprLog |
( |
int |
level, |
|
|
MprLogModule * |
module, |
|
|
char * |
fmt, |
|
|
... |
|
|
) |
|
|
|
- Synopsis:
- Log a message to the MPR logging facility
- Overview:
- Log a message at the specified log level
- Parameters:
-
level | log level between 0 and 9, 9 being the most verbose level. |
fmt | Printf style format string. Variable number of arguments to |
module | MprLogModule doing the logging. |
... | Variable number of arguments for printf data |
- Returns:
- Returns zero if successful. Otherwise a negative MPR error code.
- Remarks:
- mprLog is highly useful as a debugging aid when integrating or when developing new modules.
- Stability Classification:
- Evolving.
- Library:
- libappWeb
- See also:
- MprLogListener, mprError
|
|
|