Documentation ¶
Index ¶
- Constants
- Variables
- func GloballyDisableDebugLogForTest()
- func GloballyEnableDebugLogForTest()
- func InitGlobalLogger(logger *Logger)
- func RedirectStdLog(logger *Logger)
- type Field
- type LogFunc
- type Logger
- func (l *Logger) ChangeLevels(config *LoggerConfiguration)
- func (l *Logger) Critical(message string, fields ...Field)
- func (l *Logger) Debug(message string, fields ...Field)
- func (l *Logger) Error(message string, fields ...Field)
- func (l *Logger) Info(message string, fields ...Field)
- func (l *Logger) SetConsoleLevel(level string)
- func (l *Logger) StdLog(fields ...Field) *log.Logger
- func (l *Logger) Warn(message string, fields ...Field)
- func (l *Logger) With(fields ...Field) *Logger
- type LoggerConfiguration
Constants ¶
View Source
const ( // Very verbose messages for debugging specific issues LevelDebug = "debug" // Default log level, informational LevelInfo = "info" // Warnings are messages about possible issues LevelWarn = "warn" // Errors are messages about things we know are problems LevelError = "error" )
Variables ¶
View Source
var Err = zap.Error
View Source
var Int = zap.Int
View Source
var Int64 = zap.Int64
View Source
var String = zap.String
Functions ¶
func GloballyDisableDebugLogForTest ¶
func GloballyDisableDebugLogForTest()
DON'T USE THIS Modify the level on the app logger
func GloballyEnableDebugLogForTest ¶
func GloballyEnableDebugLogForTest()
DON'T USE THIS Modify the level on the app logger
func InitGlobalLogger ¶
func InitGlobalLogger(logger *Logger)
func RedirectStdLog ¶
func RedirectStdLog(logger *Logger)
Types ¶
type LogFunc ¶
var Critical LogFunc
var Debug LogFunc
var Error LogFunc
var Info LogFunc
var Warn LogFunc
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func NewLogger ¶
func NewLogger(config *LoggerConfiguration) *Logger
func (*Logger) ChangeLevels ¶
func (l *Logger) ChangeLevels(config *LoggerConfiguration)
func (*Logger) SetConsoleLevel ¶
Click to show internal directories.
Click to hide internal directories.