Documentation ¶
Index ¶
Constants ¶
View Source
const ( ImportantLevel = int(zapcore.ErrorLevel) InfoLevel = int(zapcore.InfoLevel) DebugLevel = int(zapcore.DebugLevel) PerformanceTestLevel = -128 )
Variables ¶
This section is empty.
Functions ¶
func GetObservedLogs ¶
func GetObservedLogs() *observer.ObservedLogs
GetObservedLogs returns ObservedLogs object, can be used in unit tests to see if something got logged
Types ¶
type Exit ¶
type Exit struct {
// contains filtered or unexported fields
}
Exit has an exit func, and will memorize the exit status code
func CreateExiter ¶
CreateExiter returns an exiter with a custom function
func Default ¶
func Default() *Exit
Default returns an Exit with default os.Exit() call. That means the status will never be visible, since os.Exit() stops everything.
type Logger ¶
func CreateDebugLogger ¶
func CreateDebugLogger() Logger
func CreateLogger ¶
CreateLogger creates a new logger instance isDebug: if enabled, the logger prints debug logs, otherwise it prints info level and above
func (Logger) FatalError ¶
FatalError logs message and error with important level and exits with code 1
Click to show internal directories.
Click to hide internal directories.