funcr: Better godocs
Tim Hockin
2 years ago
14 | 14 | */ |
15 | 15 | |
16 | 16 | // Package funcr implements formatting of structured log messages and |
17 | // optionally captures the call site. | |
17 | // optionally captures the call site and timestamp. | |
18 | 18 | // |
19 | 19 | // The simplest way to use it is via its implementation of a |
20 | 20 | // 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 | |
24 | 30 | // |
25 | 31 | // 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"). | |
27 | 34 | package funcr |
28 | 35 | |
29 | 36 | import ( |