on

Function on 

Source
pub fn on()
Expand description

Turns on the pretty defaults which is local time with no date, where all the span fields are new indented lines, activating it globally on all threads.

§Panics

Will panic if a global default is already set

§Examples

traceon::json();
traceon::info!("a json message");

output prettified:

{
  "time": "2023-01-02T04:46:12.715798+00:00",
  "level": "INFO",
  "message": "a json message"
}