mpr/log.cpp File Reference
Detailed Description
Diagnostic error, trace and logging facility.
- Overview:
- This module provides a flexible trace and error logging mechanism for development, debugging and run-time fault-finding.
|
Functions |
void | mprError (char *file, int line, int flags, char *fmt,...) |
void | mprLog (int level, MprLogModule *module, 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).
|
| 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.
- 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.
- Stability classification:
- Evolving.
- Library:
- libappweb
- See also:
- MprLogListener, mprError
|
|