Documentation ¶
Index ¶
- Constants
- Variables
- func Debugf(format string, v ...interface{})
- func MockLogger() (buf *bytes.Buffer, restore func())
- func Noticef(format string, v ...interface{})
- func Panicf(format string, v ...interface{})
- func SetLogger(l Logger)
- func SimpleSetup() error
- func StartupStageTimestamp(stage string)
- func WithLoggerLock(f func())
- type Log
- type Logger
Constants ¶
View Source
const ( // DefaultFlags are passed to the default console log.Logger DefaultFlags = log.Ldate | log.Ltime | log.Lmicroseconds | log.Lshortfile )
Variables ¶
View Source
var NullLogger = nullLogger{}
NullLogger is a logger that does nothing
Functions ¶
func Debugf ¶
func Debugf(format string, v ...interface{})
Debugf records something in the debug log
func MockLogger ¶
MockLogger replaces the exiting logger with a buffer and returns the log buffer and a restore function.
func StartupStageTimestamp ¶
func StartupStageTimestamp(stage string)
StartupStageTimestamp produce snap startup timings message.
func WithLoggerLock ¶
func WithLoggerLock(f func())
WithLoggerLock invokes f with the global logger lock, useful for tests involving goroutines with MockLogger.
Types ¶
Click to show internal directories.
Click to hide internal directories.