Documentation
¶
Index ¶
Constants ¶
View Source
const ( STDERR = "stderr" FILE = "file" )
Variables ¶
This section is empty.
Functions ¶
func SetupLoggers ¶
Types ¶
type Configuration ¶
type LoggerInterface ¶
type LoggerInterface interface {
LogDebug(msg string, fields ...zap.Field)
LogDebugWithCtx(ctx context.Context, msg string, fields ...zap.Field)
LogInfo(msg string, fields ...zap.Field)
LogInfoWithCtx(ctx context.Context, msg string, fields ...zap.Field)
LogError(msg string, fields ...zap.Field)
LogErrorWithCtx(ctx context.Context, msg string, fields ...zap.Field)
LogWarn(msg string, fields ...zap.Field)
LogWarnWithCtx(ctx context.Context, msg string, fields ...zap.Field)
AddLoggerCtx(ctx context.Context, key, value interface{}) context.Context
GetLoggerFromCtx(ctx context.Context) *zap.Logger
}
var (
Logger LoggerInterface
)
func NewZapLogger ¶
func NewZapLogger(c *Configuration) (LoggerInterface, error)
Click to show internal directories.
Click to hide internal directories.