Commit Graph

17 Commits

Author SHA1 Message Date
Olivier Poitrey acf3980132 console: handle timestamp in ms correctly + fix UTC 2019-04-25 12:44:49 -07:00
Olivier Poitrey 33f552ec3d Fix console write with missing level field 2019-04-25 12:12:24 -07:00
Olivier Poitrey 2a07580c27 Fix console writer when unix time stamp and/or no message field is used 2019-04-25 12:01:27 -07:00
Kevin McConnell 4daee2b758 Don't use faint text in colorized console output (#131)
The faint text style doesn't seem to be supported by all terminals,
which means the default console output loses most of its coloring on
them.

This commit changes the color scheme to more widely-supported colors.
This also matches how it looked in earlier versions of this library.
2019-02-07 07:45:02 -08:00
Ingmar Stein c482b20623 ConsoleWriter: fix race condition (#120)
Alternative approach to #118: fix the race condition by replacing the package-level customization settings with curried functions.
2018-12-07 09:59:01 -08:00
Ingmar Stein 7179aeef58 ConsoleWriter: reset buffer before returning it to the pool (#119)
The buffers put back into the pool should be equivalent to those generated by the `New` function.
2018-12-05 07:46:12 +00:00
Yongzheng Lai 7bcaa1a99e fix: console ts with json number (#115) 2018-11-12 00:50:17 -08:00
Karel Minarik a4c54e5d8b Fix the ConsoleWriter default parts order (#113)
In order to prevent incorrect output when somebody uses a different name eg. for the "MessageFieldName",
the `consoleDefaultPartsOrder` variable has been switched to a function, which is called in `Write()`,
in order to pick up the custom name.

Related: rs/zerolog#92
2018-11-07 09:39:38 -08:00
Karel Minarik 96f91bb4f5 Refactored zerolog.ConsoleWriter to allow customization (#92)
* Added a simple benchmarking test for the ConsoleWriter
* Refactored `zerolog.ConsoleWriter` to allow customization

Closes #84
2018-11-05 02:15:13 -08:00
Dave McCormick bae001d86b Allow devs to change the width of the logging level column in consolewriter (#87)
* Allow user to change the width of the logging level column
* Change default level width to 0 (no dynamic width)
2018-07-25 10:05:55 -07:00
Olivier Poitrey c62533f761 Fix ConsoleWriter test 2018-05-17 16:35:57 -07:00
Olivier Poitrey fb469685aa Fix ConsoleWriter when zerolog is configured to use UNIX timestamp 2018-05-17 16:10:49 -07:00
Olivier Poitrey d2b7a51951 Do not print large ints using scientific notation with ConsoleWriter
Fixes #55
2018-04-19 13:13:40 -07:00
Ravi Raju ddfae1b613 Binary format support (#37)
Adds support for binary logging (with cbor encoding) in addition to JSON. Use the binary_log compile tag to enable the feature.
2018-03-28 11:49:41 -07:00
Olivier Poitrey a717e7cbed Improve ConsoleWriter of non-scalar types 2018-02-13 00:20:42 -08:00
Olivier Poitrey 2ed2f2c974 Fix pretty logging and add a screenshot to the README 2017-08-05 20:45:41 -07:00
Olivier Poitrey 90fdb63d84 Add missing console file 2017-08-05 19:59:04 -07:00