Skip to content

Commit 8f021e1

Browse files
authored
Merge pull request #72 from cdr/docs
Document the logging levels
2 parents ae47d9c + 5e6d3c4 commit 8f021e1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

slog.go

+12
Original file line numberDiff line numberDiff line change
@@ -287,11 +287,23 @@ type Level int
287287
//
288288
// The default level is Info.
289289
const (
290+
// LevelDebug is used for development and debugging messages.
290291
LevelDebug Level = iota
292+
293+
// LevelInfo is used for normal informational messages.
291294
LevelInfo
295+
296+
// LevelWarn is used when something has possibly gone wrong.
292297
LevelWarn
298+
299+
// LevelError is used when something has certainly gone wrong.
293300
LevelError
301+
302+
// LevelCritical is used when when something has gone wrong and should
303+
// be immediately investigated.
294304
LevelCritical
305+
306+
// LevelFatal is used when the process is about to exit due to an error.
295307
LevelFatal
296308
)
297309

0 commit comments

Comments
 (0)