Source File
levels.go
Belonging Package
github.com/ipfs/go-log/v2
package logimport// LogLevel represents a log severity level. Use the package variables as an// enum.type LogLevel zapcore.Levelvar (LevelDebug = LogLevel(zapcore.DebugLevel)LevelInfo = LogLevel(zapcore.InfoLevel)LevelWarn = LogLevel(zapcore.WarnLevel)LevelError = LogLevel(zapcore.ErrorLevel)LevelDPanic = LogLevel(zapcore.DPanicLevel)LevelPanic = LogLevel(zapcore.PanicLevel)LevelFatal = LogLevel(zapcore.FatalLevel))// LevelFromString parses a string-based level and returns the corresponding// LogLevel.//// Supported strings are: DEBUG, INFO, WARN, ERROR, DPANIC, PANIC, FATAL, and// their lower-case forms.//// The returned LogLevel must be discarded if error is not nil.func ( string) (LogLevel, error) {:= zapcore.InfoLevel // zero value:= .Set()return LogLevel(),}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |