Function std_logger::init [] [src]

pub fn init()

Initialize the logger. Any logs with the target set to REQUEST_TARGET will be logged to standard out, any other logs will be printed to standard error. If the initializion fails this function will panic.

Logs are formatted using the following format. For messages (logged to standard error):

timestamp [LOG_LEVEL] target: message

For requests (using the REQUEST_TARGET target when logging, logged to standard out):

timestamp [REQUEST]: message

Note that the timestamp is not printed when the timestamp feature is not enabled (this feature is enable by default).

If the catch-panic feature is enabled (enabled by default) this will also catch and log any panics that occur.