loggers

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Log = func(lvl zapcore.Level, args ...interface{}) {
	DefaultPrint(args)
}
View Source
var Logf = func(lvl zapcore.Level, template string, args ...interface{}) {
	DefaultPrintf(template, args)
}
View Source
var Logger_2 *zap.SugaredLogger // skipCaller(2) Sugared Logger
View Source
var Logln = func(lvl zapcore.Level, args ...interface{}) {
	DefaultPrintln(args)
}
View Source
var Logw = func(lvl zapcore.Level, msg string, keysAndValues ...interface{}) {
	DefaultPrintw(msg, keysAndValues)
}

Functions

func CDPanic

func CDPanic(ctx context.Context, template string, args ...interface{})

func CDPanicln

func CDPanicln(ctx context.Context, args ...interface{})

func CDPanicw

func CDPanicw(ctx context.Context, msg string, keysAndValues ...interface{})

func CDebug

func CDebug(ctx context.Context, template string, args ...interface{})

func CDebugln

func CDebugln(ctx context.Context, args ...interface{})

func CDebugw

func CDebugw(ctx context.Context, msg string, keysAndValues ...interface{})

func CError

func CError(ctx context.Context, template string, args ...interface{})

func CErrorln

func CErrorln(ctx context.Context, args ...interface{})

func CErrorw

func CErrorw(ctx context.Context, msg string, keysAndValues ...interface{})

func CFatal

func CFatal(ctx context.Context, template string, args ...interface{})

func CFatalln

func CFatalln(ctx context.Context, args ...interface{})

func CFatalw

func CFatalw(ctx context.Context, msg string, keysAndValues ...interface{})

func CInfo

func CInfo(ctx context.Context, template string, args ...interface{})

func CInfoln

func CInfoln(ctx context.Context, args ...interface{})

func CInfow

func CInfow(ctx context.Context, msg string, keysAndValues ...interface{})

func CLog

func CLog(ctx context.Context, level zapcore.Level, extra_skip int, template string, args ...interface{})

func CLogln

func CLogln(ctx context.Context, level zapcore.Level, extra_skip int, args ...interface{})

func CLogw

func CLogw(ctx context.Context, level zapcore.Level, extra_skip int, msg string, keysAndValues ...interface{})

func CPanic

func CPanic(ctx context.Context, template string, args ...interface{})

func CPanicln

func CPanicln(ctx context.Context, args ...interface{})

func CPanicw

func CPanicw(ctx context.Context, msg string, keysAndValues ...interface{})

func CWarn

func CWarn(ctx context.Context, template string, args ...interface{})

func CWarnln

func CWarnln(ctx context.Context, args ...interface{})

func CWarnw

func CWarnw(ctx context.Context, msg string, keysAndValues ...interface{})

func DefaultError

func DefaultError(args ...interface{})

func DefaultErrorf

func DefaultErrorf(template string, args ...interface{})

func DefaultErrorln

func DefaultErrorln(args ...interface{})

func DefaultErrorw

func DefaultErrorw(msg string, keysAndValues ...interface{})

func DefaultPanic

func DefaultPanic(args ...interface{})

func DefaultPanicf

func DefaultPanicf(template string, args ...interface{})

func DefaultPanicln

func DefaultPanicln(args ...interface{})

func DefaultPanicw

func DefaultPanicw(msg string, keysAndValues ...interface{})

func DefaultPrint

func DefaultPrint(args ...interface{})

func DefaultPrintf

func DefaultPrintf(template string, args ...interface{})

func DefaultPrintln

func DefaultPrintln(args ...interface{})

func DefaultPrintw

func DefaultPrintw(msg string, keysAndValues ...interface{})

func NewXormZapSugaredLogger

func NewXormZapSugaredLogger(logger *zap.SugaredLogger) *xormZapSugaredLogger

func UsingDefaultLogger

func UsingDefaultLogger()

Types

type SLogger

type SLogger struct {
	Template      string
	KeysAndValues []any
}

func NewSLogger

func NewSLogger(template string, keysAndValues ...any) *SLogger

func (*SLogger) CDPanic

func (s *SLogger) CDPanic(ctx context.Context, template string, args ...interface{})

func (*SLogger) CDPanicln

func (s *SLogger) CDPanicln(ctx context.Context, args ...interface{})

func (*SLogger) CDPanicw

func (s *SLogger) CDPanicw(ctx context.Context, msg string, keysAndValues ...interface{})

func (*SLogger) CDebug

func (s *SLogger) CDebug(ctx context.Context, template string, args ...interface{})

func (*SLogger) CError

func (s *SLogger) CError(ctx context.Context, template string, args ...interface{})

func (*SLogger) CErrorln

func (s *SLogger) CErrorln(ctx context.Context, args ...interface{})

func (*SLogger) CErrorw

func (s *SLogger) CErrorw(ctx context.Context, msg string, keysAndValues ...interface{})

func (*SLogger) CFatal

func (s *SLogger) CFatal(ctx context.Context, template string, args ...interface{})

func (*SLogger) CFatalln

func (s *SLogger) CFatalln(ctx context.Context, args ...interface{})

func (*SLogger) CFatalw

func (s *SLogger) CFatalw(ctx context.Context, msg string, keysAndValues ...interface{})

func (*SLogger) CInfo

func (s *SLogger) CInfo(ctx context.Context, template string, args ...interface{})

func (*SLogger) CInfoln

func (s *SLogger) CInfoln(ctx context.Context, args ...interface{})

func (*SLogger) CInfow

func (s *SLogger) CInfow(ctx context.Context, msg string, keysAndValues ...interface{})

func (*SLogger) CLog

func (s *SLogger) CLog(ctx context.Context, level zapcore.Level, extra_skip int, template string, args ...interface{})

func (*SLogger) CLogln

func (s *SLogger) CLogln(ctx context.Context, level zapcore.Level, extra_skip int, args ...interface{})

func (*SLogger) CLogw

func (s *SLogger) CLogw(ctx context.Context, level zapcore.Level, extra_skip int, msg string, keysAndValues ...interface{})

func (*SLogger) CPanic

func (s *SLogger) CPanic(ctx context.Context, template string, args ...interface{})

func (*SLogger) CPanicln

func (s *SLogger) CPanicln(ctx context.Context, args ...interface{})

func (*SLogger) CPanicw

func (s *SLogger) CPanicw(ctx context.Context, msg string, keysAndValues ...interface{})

func (*SLogger) CWarn

func (s *SLogger) CWarn(ctx context.Context, template string, args ...interface{})

func (*SLogger) CWarnln

func (s *SLogger) CWarnln(ctx context.Context, args ...interface{})

func (*SLogger) CWarnw

func (s *SLogger) CWarnw(ctx context.Context, msg string, keysAndValues ...interface{})

func (*SLogger) GetKeysAndValues

func (s *SLogger) GetKeysAndValues() []any

func (*SLogger) GetMsg

func (s *SLogger) GetMsg(msg string) string

func (*SLogger) With

func (s *SLogger) With(key string, value interface{}) *SLogger

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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