Commit Graph

80 Commits

Author SHA1 Message Date
a 3a569c99c0
merge 2023-07-17 11:43:17 -05:00
Angus 8981d80ed3
Correct logger variable name in stdout example (#549) 2023-05-11 14:00:42 +02:00
Koung 927516bcf1
doc(readme): fix a typo (#548)
Co-authored-by: jirasak <jirasak@lmwn.com>
2023-05-01 14:04:49 +02:00
Kirill a712f61936
doc(readme): explain zerolog with context (#544)
Add section about `context.Context` usage with zerolog instance
2023-04-21 11:55:19 +02:00
a 1a96beea25 merge? 2022-12-28 03:30:30 -06:00
a 99eea905a5 Rename 2022-11-03 10:18:09 -05:00
Michael Nikitochkin e218d18951
Update example of usage CallerMarshalFunc (#475)
There was changes in https://github.com/rs/zerolog/pull/457  pass program counter to CallerMarshalFunc.
Update example in README.md
2022-09-09 23:18:08 +02:00
Robson Roberto Souza Peixoto a4ec5e4cdd
typo: using https to access cbor.io (#439) 2022-05-05 19:17:37 +02:00
elee cc50acd599 updat redme 2022-03-20 14:31:02 -05:00
elee c7d28c47c7 change log 2022-03-20 14:19:42 -05:00
Igor Beliakov e9344a8c50
docs: add an example for Lshortfile-like implementation of CallerMarshalFunc (#423)
Signed-off-by: Igor Beliakov <demtis.register@gmail.com>
2022-03-12 08:33:09 -08:00
nichady c0c2e11fc3
Consistent casing, redundancy, and spelling/grammar (#391)
* fix casing
* remove redundant type conversions
* remove unnecessary append
x = append(y) is equivalent to x = y
* fix grammar and spelling
* rename file to enforce consistent casing with other READMEs in this repo
2021-12-21 13:07:54 +01:00
hn8 07d347e658
Update zerologr url (#364)
Transferred to go-logr
2021-09-25 09:57:54 +02:00
hn8 9b9fc5c6b7
Update zerologr url (#359)
Transferred from hn8 to screenleap.
2021-09-14 13:27:57 +02:00
hn8 164ec91b0c
Add logr implementation to README and json.RawMessage to Fields() (#337) 2021-08-03 11:31:54 +02:00
Marcus Watkins ffbd37b8d7
Add Func log method (#321)
This adds the Func log method to log using an anonymous function
only if the level is currently enabled.

The use case is for when you don't own an object and therefore can't
create your own marshaller but need to do some translation prior to
logging.

For example, this:

msg := log.Debug()
if msg.Enabled() {
  msg.Str("complicated_thing", makeBinaryThingLoggable(thing))
}
msg.Msg("Sending complicated thing")

Turns into this:

log.Debug().
  Func(func(e *Event) { e.Str("complicated_thing", makeBinaryThingLoggable(thing)) }).
  Msg("Sending complicated thing")
2021-05-20 01:33:11 +02:00
Olivier Poitrey 98f889fcde Revert "Fix Typo (#306)"
This reverts commit f85e803cc5.
2021-04-07 19:58:46 +02:00
Redha Juanda f85e803cc5
Fix Typo (#306) 2021-04-07 16:12:54 +02:00
Emre Arslan 72b5b1ea58
added overlog to related project (#302)
Co-authored-by: Emre Arslan <emre.arslan@trendyol.com>
2021-03-18 16:21:38 +01:00
Dan Gillis 0aba2e4ae5
Add Error logging section and section links (#275) 2020-12-30 00:57:10 +01:00
Dima 7825d86337
stringer event method (#185) 2020-05-28 10:43:18 -07:00
Fred Muya 63767a55ec
Add Example for Multiple Outputs using Multiwriter (#198)
Fixes #73
2020-05-28 10:41:39 -07:00
Stig Otnes Kolstad 663cbb4c84
docs: minor typos (#234) 2020-05-14 08:27:19 -07:00
Olivier Poitrey a06edf20d7
Fix zerolog.SetGlobalLevel readme 2020-04-20 13:50:01 -07:00
Milo d9df1802de
Updated README (#212)
Updated README to reflect changes in the code - included new field types available, corrected typos.
2020-02-15 09:27:26 -08:00
Ryo Ota 65ed30bfb0 Use ```bash instead of ```go (#209) 2020-01-01 12:32:59 -08:00
CrazyMax 4502cc1942 Add TraceLevel (#158) 2019-11-04 11:39:22 -08:00
hazimj 7592fcbe60 make TimeFormatUnixMicro var exportable (#189) 2019-10-24 17:02:51 -07:00
hazimj 19e454b4c7 Add Unix time format for microseconds (#188) 2019-10-09 20:35:32 -07:00
Charles Chan 61d1749124 Fix description in README for Global Settings (#176) 2019-08-11 07:03:49 +02:00
i6du 77a1695358 add send function for convenience (#164) 2019-07-03 23:16:03 -07:00
Vasiliy Faronov 1a2c7daec4 Fix misleading text about duplicate keys in JSON (#141)
Per RFC 8259 Section 4, behavior on duplicate keys is unspecified.

Fixes #140.
2019-05-25 18:51:33 -07:00
Olivier Poitrey 3e85c4b21c Add a new time format for UNIX timestamp in milliseconds 2019-04-19 15:48:31 -07:00
Olivier Poitrey 8747b7b3a5 Add ErrorHandler global to allow handling of write errors 2018-11-20 10:56:21 -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
Thiago Caiubi 624b3116d8 Fix sub-logger by context example (#106)
Not quite sure but looks like the example is using the wrong API.
2018-09-18 07:57:53 -07:00
Olivier Poitrey 785a567b10 Add a mention to logbench 2018-09-18 02:18:32 -07:00
Duncan Hall b6f076edc8 Add note for default writing to os.Stderr (#97) 2018-08-31 09:46:32 -07:00
Marcelo Aymone 85255a5e26 Fix typo on documentation (#94) 2018-08-14 19:23:11 -07:00
Josh Rendek 1a88fbfdd0 Update readme at example for Caller() (#76)
* Update readme at example for Caller()
2018-06-03 22:57:37 -07:00
Pichugin Dmitry dabc72c15b fix README (#74) 2018-05-31 10:33:44 -07:00
Rafael Passos c19f1e5eed Diode module Documentation update (#71)
* Updated Diode example to match new style

* DOC: changed w to wr in assigment to reduce ambiguity
2018-05-25 14:45:33 -07:00
Olivier Poitrey b5207c012d
Fix type in README (fix #62) 2018-05-12 22:12:35 -07:00
Olivier Poitrey 89162918d0
Add grpc-zerolog reference (fix #58) 2018-04-26 13:41:11 -07:00
Dan Gillis 711d95f5f1 Some new readability updates (#54) 2018-04-18 20:29:59 -07:00
Ravi Raju 2ccfab3e07 Support for adding IP Address/Prefix + stream based decoder (#49)
* added IPAddr, IPPrefix and stream based cbor decoder
* Update README with cbor decoder tool info
* Update README in cbor with comparison data
2018-04-03 23:07:18 +02:00
Olivier Poitrey 05eafee0eb Update README with instruction about binary encoding 2018-03-28 11:59:26 -07:00
Olivier Poitrey 3ab376bc30
Add "Who uses zerolog" wiki page link 2018-03-25 22:34:03 -07:00
Kai Ren b62d797a8d Mention fields duplication caveat in documentation (#41) 2018-03-08 07:41:28 -08:00
Olivier Poitrey 8c1c6a0cd7 Add diode.Writer, a thread-safe, lock-free, non-blocking writer wrapper 2018-02-20 02:33:26 -08:00