rs / zerolog

Zero Allocation JSON Logger
MIT License
10.41k stars 567 forks source link

Fix console formatter for TimeFormatUnixNano #502

Closed binaryphile closed 1 year ago

binaryphile commented 1 year ago

The existing code doesn't provide for the TimeFormatUnixNano case, and the default is to use the timestamp as seconds, not nanoseconds. The following request preserves behavior for any case other than TimeFormatUnixNano, but fixes that case.