Documentation
¶
Index ¶
- func Errorf(format string, args ...interface{})
- func Fatalf(format string, args ...interface{})
- func Infof(format string, args ...interface{})
- func Init(logConfigs []*LogConfig) error
- func Initialize(name, severity string) error
- func SetSeverity(s Severity)
- func Warningf(format string, args ...interface{})
- type LogConfig
- type Logger
- type Severity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Errorf ¶
func Errorf(format string, args ...interface{})
Errorf logs to the ERROR, WARNING, and INFO logs.
func Fatalf ¶
func Fatalf(format string, args ...interface{})
Fatalf logs to the FATAL, ERROR, WARNING, and INFO logs, including a stack trace of all running goroutines, then calls os.Exit(255).
func Initialize ¶
func SetSeverity ¶
func SetSeverity(s Severity)
SetSeverity sets current logging severity. Acceptable values are SeverityInfo, SeverityWarn, SeverityError, SeverityFatal
Types ¶
type LogConfig ¶
type LogConfig struct {
Name string
}
Logging configuration to be passed to all loggers during initialization.
type Logger ¶
type Logger interface { Infof(format string, args ...interface{}) Warningf(format string, args ...interface{}) Errorf(format string, args ...interface{}) Fatalf(format string, args ...interface{}) Writer(Severity) io.Writer }
Logger is a unified interface for all loggers.
func NewConsoleLogger ¶
func NewSysLogger ¶
Click to show internal directories.
Click to hide internal directories.