Codebase list golang-github-go-logr-logr / 94ad96f
funcr: Better godocs Tim Hockin 2 years ago
1 changed file(s) with 12 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
1414 */
1515
1616 // Package funcr implements formatting of structured log messages and
17 // optionally captures the call site.
17 // optionally captures the call site and timestamp.
1818 //
1919 // The simplest way to use it is via its implementation of a
2020 // github.com/go-logr/logr.LogSink with output through an arbitrary
21 // "write" function. Alternatively, funcr can also be embedded inside
22 // a custom LogSink implementation. This is useful when the LogSink
23 // needs to implement additional methods.
21 // "write" function. See New and NewJSON for details.
22 //
23 // Custom LogSinks
24 //
25 // For users who need more control, a funcr.Formatter can be embedded inside
26 // your own custom LogSink implementation. This is useful when the LogSink
27 // needs to implement additional methods, for example.
28 //
29 // Formatting
2430 //
2531 // This will respect logr.Marshaler, fmt.Stringer, and error interfaces for
26 // values which are being logged.
32 // values which are being logged. When rendering a struct, funcr will use Go's
33 // standard JSON tags (all except "string").
2734 package funcr
2835
2936 import (