Fix some internal names
Tim Hockin
2 years ago
200 | 200 | return newFormatter(opts, outputJSON) |
201 | 201 | } |
202 | 202 | |
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 | |
205 | 206 | |
206 | 207 | func newFormatter(opts Options, outfmt outputFormat) Formatter { |
207 | 208 | if opts.TimestampFormat == "" { |
208 | opts.TimestampFormat = defaultTimestampFmt | |
209 | opts.TimestampFormat = defaultTimestampFormat | |
209 | 210 | } |
210 | 211 | if opts.MaxLogDepth == 0 { |
211 | opts.MaxLogDepth = defaultMaxDepth | |
212 | opts.MaxLogDepth = defaultMaxLogDepth | |
212 | 213 | } |
213 | 214 | f := Formatter{ |
214 | 215 | outputFormat: outfmt, |