Documentation
¶
Overview ¶
Package slog is a simple logger, using a worker goroutine to print the output strings and optionally log them with Apache-style timestamps, optionally using configurable channels instead of os.Stdout and os.Stderr.
Index ¶
- func CloseErrorFile() error
- func CloseMsgFile() error
- func CloseWarnFile() error
- func Error(f string, v ...interface{})
- func Msg(f string, v ...interface{})
- func SetErrorFile(file *os.File)
- func SetMsgFile(file *os.File)
- func SetWarnFile(file *os.File)
- func TError(f string, v ...interface{})
- func TMsg(f string, v ...interface{})
- func TWarn(f string, v ...interface{})
- func Warn(f string, v ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseErrorFile ¶ added in v0.7.0
func CloseErrorFile() error
CloseErrorFile and set the error output back to stderr.
func CloseMsgFile ¶ added in v0.7.0
func CloseMsgFile() error
CloseMsgFile and set the message output back to stdout.
func CloseWarnFile ¶ added in v0.7.0
func CloseWarnFile() error
CloseWarnFile and set the warning output back to stderr.
func SetErrorFile ¶
SetErrorFile lets you set the output for error messages. The default is os.Stderr. If a new file is supplied, the user is responsible for closing it.
func SetMsgFile ¶
SetMsgFile lets you set the output for informational messages. The default is os.Stdout. If a new file is supplied, the user is responsible for closing it.
func SetWarnFile ¶ added in v0.4.0
SetWarnFile lets you set the output for warning messages. The default is os.Stderr. If a new file is supplied, the user is responsible for closing it.
func TError ¶
func TError(f string, v ...interface{})
TError sends a log message to the error output with timestamps.
func TMsg ¶
func TMsg(f string, v ...interface{})
TMsg sends a log message to the information output with timestamps.
Types ¶
This section is empty.