Commit Graph

15 Commits

Author SHA1 Message Date
a 3dd6446281 change format 2022-03-21 23:17:16 +00:00
elee c7d28c47c7 change log 2022-03-20 14:19:42 -05:00
Zephaniah Loss-Cutler-Hull 4de2fcc128
Fix handling of printing caller with Write, Print, and Printf. (#315)
* Add event.CallerSkipFrame(skip int)

This indicates that, for this event, we should skip an additional
specified number of frames.

This is cumulative, calling it twice for the same event will add both
numbers together, and this is in addition to any skip frame settings set
through the context, or globally.

The indended purpose is for wrappers to Msg or Msgf, so that the actual
caller is always printed correctly.

* Use CallerSkipFrame for Print, Printf, and Write.

This allows us to use the correct caller when using these 3 functions.

Co-authored-by: Zephaniah E. Loss-Cutler-Hull <warp@aehallh.com>
2021-05-13 17:22:27 +02:00
Olivier Poitrey 5d9d7660cc Expose the Err helper from the global logger 2019-11-18 16:22:50 -08:00
CrazyMax 4502cc1942 Add TraceLevel (#158) 2019-11-04 11:39:22 -08:00
Olivier Poitrey 9a92fd2536 Fix typoes 2018-02-10 18:57:53 -08:00
nogoegst c2fc1c63dc Add missing WithLevel method to log package (#27) 2017-12-14 10:33:32 -08:00
Rodrigo Coelho c3d02683c7 Add hook support (#24) 2017-12-01 10:52:37 -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 a83efb6080 Add a ConsoleWriter to output pretty log on the console during dev 2017-08-05 19:47:55 -07:00
Olivier Poitrey 3f54be8716 Improve context.Context logging 2017-05-20 00:22:37 -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 7f302b00ec Initial commit 2017-05-13 16:22:35 -07:00