Commit db4fd8f
Datanoise
logger: initialise L to a no-op SugaredLogger by default
Production code calls Init() from main, but tests and any other entry
point that imports the logger package without initialising it would
hit a nil-pointer panic on the first L.Warnf / L.Infow call. Default
to zap.NewNop().Sugar() so the global is always safe; Init() still
replaces it with the configured logger.1 parent 6d22922 commit db4fd8f
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| |||
0 commit comments