Documentation ¶
Overview ¶
Package slog provides a cross-platform logging interface. It is designed to provide a universal logging interface on any operating system. It defaults to using the log package of the standard library, but can easily be used with other logging backends. Thus, we can use syslog on unicies and the event log on windows.
Index ¶
- Variables
- func Error(v ...interface{})
- func Errorf(format string, v ...interface{})
- func Errorln(v ...interface{})
- func Fatal(v ...interface{})
- func Fatalf(format string, v ...interface{})
- func Fatalln(v ...interface{})
- func Info(v ...interface{})
- func Infof(format string, v ...interface{})
- func Infoln(v ...interface{})
- func Set(l Logger)
- func SetSyslog(tag string) error
- func Warning(v ...interface{})
- func Warningf(format string, v ...interface{})
- func Warningln(v ...interface{})
- func Wrap(err error) error
- type Logger
- type StdLog
- type Syslog
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // LogLineNumber prints the file and line number of the caller. LogLineNumber = true )
Functions ¶
func Fatalf ¶
func Fatalf(format string, v ...interface{})
Fatalf logs a fatal message and calls os.Exit(1).
Types ¶
type StdLog ¶
StdLog logs to a log.Logger.
Click to show internal directories.
Click to hide internal directories.