logger

package
v0.0.0-...-e63b808 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const FUNCTION_SKIP_LEVEL = 1

Variables

This section is empty.

Functions

func WithCtx

func WithCtx(ctx context.Context, l *CBLogger) context.Context

WithCtx returns a copy of ctx with the Logger attached.

Types

type CBLogger

type CBLogger struct {
	// contains filtered or unexported fields
}

func FromCtx

func FromCtx(ctx context.Context) *CBLogger

FromCtx returns the Logger associated with the ctx. If no logger is associated, the default logger is returned, unless it is nil in which case a disabled logger is returned.

func Get

func Get() *CBLogger

Get initializes a zap.Logger instance if it has not been initialized already and returns the same instance for subsequent calls.

func (*CBLogger) Debug

func (c *CBLogger) Debug(msg string, fields ...zap.Field)

func (*CBLogger) Error

func (c *CBLogger) Error(msg string, fields ...zap.Field)

func (*CBLogger) Fatal

func (c *CBLogger) Fatal(msg string, fields ...zap.Field)

func (*CBLogger) Info

func (c *CBLogger) Info(msg string, fields ...zap.Field)

func (*CBLogger) Panic

func (c *CBLogger) Panic(msg string, fields ...zap.Field)

func (*CBLogger) Warn

func (c *CBLogger) Warn(msg string, fields ...zap.Field)

func (*CBLogger) With

func (l *CBLogger) With(f zapcore.Field) *CBLogger

WithCtx returns a copy of ctx with the Logger attached.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL