Documentation ¶
Index ¶
- Constants
- Variables
- func Debug(ctx context.Context, msg string, values ...Value)
- func Error(ctx context.Context, msg string, values ...Value)
- func Info(ctx context.Context, msg string, values ...Value)
- func NewDriver(logger zapLogger) zapDriver
- func NewZapLogger(level Level, output Out) (*zap.Logger, error)
- func SetLoggerDefault(logger Logger) error
- type Driver
- type Level
- type LogWriter
- type Logger
- type Out
- type Value
Constants ¶
View Source
const ( //STDOUT any message to stdout STDOUT Out = "stdout" //STDERR redirects any message to stderr STDERR Out = "stderr" //ERROR is the error level logger ERROR Level = "error" //INFO is the info level logger INFO Level = "info" //DEBUG is the debug level logger DEBUG Level = "debug" )
Variables ¶
View Source
var LoggerDefault = NewZapLoggerDefault()
LoggerDefault is the back-end implementation used on the log package level functions
Functions ¶
func SetLoggerDefault ¶
Types ¶
type Level ¶
type Level string
Level is the threshold of the logger
type Logger ¶
type Logger interface { Debug(context.Context, string, ...Value) Info(context.Context, string, ...Value) Error(context.Context, string, ...Value) }
func NewZapLoggerDefault ¶
func NewZapLoggerDefault() Logger
Click to show internal directories.
Click to hide internal directories.