File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -140,9 +140,10 @@ log.Printf("[DEBUG] %d", 42)
140
140
... [DEBUG] my-app: 42
141
141
```
142
142
143
- Notice that if ` appLogger ` is initialized with the ` INFO ` log level _ and_ you
143
+ Notice that if ` appLogger ` is initialized with the ` INFO ` log level, _ and_ you
144
144
specify ` InferLevels: true ` , you will not see any output here. You must change
145
145
` appLogger ` to ` DEBUG ` to see output. See the docs for more information.
146
146
147
147
If the log lines start with a timestamp you can use the
148
- ` InferLevelsWithTimestamp ` option to try and ignore them.
148
+ ` InferLevelsWithTimestamp ` option to try and ignore them. Please note that in order
149
+ for ` InferLevelsWithTimestamp ` to be relevant, ` InferLevels ` must be set to ` true ` .
Original file line number Diff line number Diff line change @@ -233,6 +233,7 @@ type StandardLoggerOptions struct {
233
233
// [DEBUG] and strip it off before reapplying it.
234
234
// The timestamp detection may result in false positives and incomplete
235
235
// string outputs.
236
+ // InferLevelsWithTimestamp is only relevant if InferLevels is true.
236
237
InferLevelsWithTimestamp bool
237
238
238
239
// ForceLevel is used to force all output from the standard logger to be at
You can’t perform that action at this time.
0 commit comments