You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 23, 2024. It is now read-only.
// If you want to use zerolog for human-readable console logging,
112
+
// you create a ConsoleWriter and use it as your io.Writer implementation
113
+
consoleLogger:= zl.New(zl.ConsoleWriter{
114
+
Out: os.Stdout,
115
+
})
116
+
cLogger:= zerolog.New(consoleLogger)
117
+
cLogger.Debug("debug message")
118
+
// |DEBUG| debug message
119
+
}
120
+
```
121
+
78
122
### Test Logger
79
123
The test logger is for capturing logs during the execution of a test. It writes the logs to a byte buffer which can be dumped and inspected. It also tracks a call count of the total number of times the logger has been called.
80
124
**_Note:_** this logger is not meant to be used in production. It is purely designed for use in tests.
0 commit comments