serokell / log-warper

Logging library to provide more convenient, extremely configurable but simple monadic interface with pretty output
MIT License
19 stars 11 forks source link

[CSL-1739] Add ability to specify time format #23

Closed chshersh closed 7 years ago

chshersh commented 7 years ago

Now by default milliseconds are shown every time. But you can customize logging format from config.

chshersh commented 7 years ago

@volhovM @gromakovsky Now by default centiseconds are printed like this:

[node:DEBUG] [2017-10-07 23:36:07.21 UTC] skovoroda
[node:INFO] [2017-10-07 23:36:07.21 UTC] patak
[node:NOTICE] [2017-10-07 23:36:07.21 UTC] boroda
[node:WARNING] [2017-10-07 23:36:07.21 UTC] haha
[node:ERROR] [2017-10-07 23:36:07.21 UTC] BARDAQ
[node:ERROR] [2017-10-07 23:36:07.21 UTC] BARDAQ

Also you can specify how to format time with custom UTCTime -> Text function.