logger

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetLevel

func SetLevel(levelStr string)

SetLevel sets the log level

Types

type Logger

type Logger struct{}

Logger is a wrapper for zerolog

func (*Logger) Debug

func (l *Logger) Debug(args ...interface{})

Debug logs a message at Debug level.

func (*Logger) Error

func (l *Logger) Error(args ...interface{})

Error logs a message at Error level.

func (*Logger) Fatal

func (l *Logger) Fatal(args ...interface{})

Fatal logs a message at Fatal level and process will exit with status set to 1.

func (*Logger) Info

func (l *Logger) Info(args ...interface{})

Info logs a message at Info level.

func (*Logger) Warn

func (l *Logger) Warn(args ...interface{})

Warn logs a message at Warning level.

type ZLogger

type ZLogger struct{}

ZLogger is the logger for gorm

func (ZLogger) Error

func (l ZLogger) Error(ctx context.Context, msg string, opts ...interface{})

Error is the error log

func (ZLogger) Info

func (l ZLogger) Info(ctx context.Context, msg string, opts ...interface{})

Info is the info log

func (ZLogger) LogMode

func (l ZLogger) LogMode(logger.LogLevel) logger.Interface

LogMode is the log mode

func (ZLogger) Trace

func (l ZLogger) Trace(ctx context.Context, begin time.Time, f func() (string, int64), err error)

Trace is the trace log

func (ZLogger) Warn

func (l ZLogger) Warn(ctx context.Context, msg string, opts ...interface{})

Warn is the warn log

Jump to

Keyboard shortcuts

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