Hi. I would like to update the default Vapor logs format to include a timestamp. Can anyone point at how to do it?
Thanks!
Hi. I would like to update the default Vapor logs format to include a timestamp. Can anyone point at how to do it?
Thanks!
When you bootstrap the logger, you want to use this function and then initialise the logger with the timestamp fragment
Awesome, thanks! I replaced the default one with the following snippet and it worked:
let level = try Logger.Level.detect(from: &env)
LoggingSystem.bootstrap(fragment: timestampDefaultLoggerFragment(), console: Terminal(), level: level)