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
Kai Ren
b62d797a8d
Mention fields duplication caveat in documentation ( #41 )
2018-03-08 07:41:28 -08:00
Olivier Poitrey
fcbdf23e9e
Use new hook internally to handle timestamp in context
2018-02-07 13:31:00 -08:00
Rodrigo Coelho
c3d02683c7
Add hook support ( #24 )
2017-12-01 10:52:37 -07:00
Ravi Raju
9a65e7ccd2
Fix Output with existing context ( fix #20 )
...
Also includes tests for Output()
2017-11-08 10:47:56 -08:00
Giovanni Bajo
89e128fdc1
Speed up operations when logging is disabled. ( #18 )
...
Low-level optimizations to help the compiler generate better code
when logging is disabled. Measured improvement is ~30% on amd64
(from 21 ns/op to 16 ns/op).
2017-11-05 05:22:20 -08:00
Olivier Poitrey
3ac71fc58d
Simplify copies
2017-09-03 11:01:28 -07:00
Olivier Poitrey
26094019c8
Fix godoc
2017-09-01 20:07:47 -07:00
Olivier Poitrey
8c682b3b12
Add Print and Printf top level methods
2017-09-01 19:59:48 -07:00
Olivier Poitrey
e26050b2a3
Improve hlog handlers performance by switching to pointer logger
...
Update request logger's context thru its pointer in order to avoid
multiple copies/allocations.
2017-08-29 22:53:32 -07:00
Olivier Poitrey
9e5c06cf0e
Add more advanced sampling modes
2017-08-28 23:30:54 -07:00
Olivier Poitrey
2ed2f2c974
Fix pretty logging and add a screenshot to the README
2017-08-05 20:45:41 -07:00
Olivier Poitrey
a83efb6080
Add a ConsoleWriter to output pretty log on the console during dev
2017-08-05 19:47:55 -07:00
Olivier Poitrey
6cdd9977c4
Refactor JSON encoding code
2017-07-25 22:05:32 -07:00
Olivier Poitrey
7af653895b
Add utility functions WithLevel and Fields
...
Add some utility functions to ease migration from other logger API.
2017-07-10 02:58:58 -07:00
Olivier Poitrey
2e3da1d5b5
Always place timestamp as first field for better log readability
2017-06-08 10:12:49 -07:00
Olivier Poitrey
2a829377cb
Rename warning field to warn in the output
2017-06-08 10:03:03 -07:00
Olivier Poitrey
3f6ca6688c
Fix Fatal and Panic not terminating to program
2017-06-06 10:23:34 -07:00
Olivier Poitrey
46cd35d1f2
Remove error returned by Msg and Msgf
...
When error happen, there is nothing the caller can really do and it is
not practicle to handle logging errors. Print an error on the standard
error instead.
2017-06-06 10:10:31 -07:00
Olivier Poitrey
95ecd5ad27
Fix Log level
2017-06-05 13:03:55 -07:00
Olivier Poitrey
7e8bba7e7f
Fix typos
2017-06-05 13:03:55 -07:00
Olivier Poitrey
67803eb791
Add Nop constructor
2017-06-02 00:24:52 -07:00
Olivier Poitrey
6bcd15ecf0
Add support for zerolog as an output for stdlib logger
2017-06-01 23:17:28 -07:00
Olivier Poitrey
6a6144a10b
Add http.Handler helpers (adapted from xlog)
2017-05-20 01:48:00 -07:00
Olivier Poitrey
d0cfcbbafe
Write directly into a single shared buffer per event for even better perf
2017-05-19 19:45:46 -07:00
Olivier Poitrey
77726764ed
Optimize disabled logging
2017-05-19 09:56:31 -07:00
Olivier Poitrey
a417fb1a8b
Fix sample template types
2017-05-19 09:48:01 -07:00
Olivier Poitrey
af9dd4ec23
Add SyncWriter utility type for non-thread-safe writers
2017-05-19 09:13:04 -07:00
Olivier Poitrey
d0a1bd7e3e
Make GlobalLevel and DisableSampling thread safe
2017-05-15 11:18:42 -07:00
Olivier Poitrey
7f302b00ec
Initial commit
2017-05-13 16:22:35 -07:00