Codebase list golang-github-go-logr-logr / 2ccfbf6
Fix some internal names Tim Hockin 2 years ago
1 changed file(s) with 5 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
200200 return newFormatter(opts, outputJSON)
201201 }
202202
203 const defaultTimestampFmt = "2006-01-02 15:04:05.000000"
204 const defaultMaxDepth = 16
203 // Defaults for Options.
204 const defaultTimestampFormat = "2006-01-02 15:04:05.000000"
205 const defaultMaxLogDepth = 16
205206
206207 func newFormatter(opts Options, outfmt outputFormat) Formatter {
207208 if opts.TimestampFormat == "" {
208 opts.TimestampFormat = defaultTimestampFmt
209 opts.TimestampFormat = defaultTimestampFormat
209210 }
210211 if opts.MaxLogDepth == 0 {
211 opts.MaxLogDepth = defaultMaxDepth
212 opts.MaxLogDepth = defaultMaxLogDepth
212213 }
213214 f := Formatter{
214215 outputFormat: outfmt,