|Definition|| class MprLog|
The MprLog class manages the Application's internal MPR log mechanism.
If the Application was started with a
"--log" command line switch, the application will write log messages to the specified file, otherwise
messages will be sent to the standard error console. The Application will have a single instance of the
MprLog class created and stored in the App.mprLog property.
The Logger class can be used to create higher level logging filters and aggregators and use the MprLog as the
final output stream.
| get set ||fixed||Boolean||Is the MPR logging fixed. Set to true if the application logging has been fixed by a hosting environment or
if the application initiated logging via a command line --log switch.|
| get set ||level||Number||The numeric verbosity setting (0-9) of this MprLog. Zero is least verbose, nine is the most verbose.
Messages with a lower (or equal) verbosity level than the MprLog's level are emitted.
WARNING: Changing the logging verbosity level will affect logging for all interpreters.|
MprLog Class Methods
(No own class methods defined)
MprLog Instance Methods
- Emit messages to the MprLog stream at a given level.
|level: Number ||Verbosity level at which to emit the message (0-9).|
|data: Array ||Data messages to emit.|
- Redirect log output. WARNING: Redirecting the logging output will redirect messages for all interpreters.
|location: String ||Output location to send messages to.|
|level: Number ||Verbosity level for logging. [default: null]|
- Write data to the stream.Write messages to the MprLog stream at level 0. If the stream can accept all the write data, the call returns immediately with the number of bytes written.
If writing more data than the stream can absorb in sync mode, the call will block until the data is written.
If writing more data than the stream can absorb in async mode, the call will not block and will buffer the
data and return immediately. Some streams will require a flush() call to actually send the data.
A "writable" event will be issued when the stream can again absorb more data.
|data: Array ||Data to write.|
|readable||Issued when data is written and a consumer can read without blocking.
||writable||Issued when the stream becomes empty and it is ready to be written to.
- A count of the bytes actually written.
IOError: if there is an I/O error.