Documentation ¶
Index ¶
- func InitFromConfig(loggerPrefixName, moduleName string, logLevel int, isStdout bool, isJson bool, ...) error
- func ZDebug(ctx context.Context, msg string, keysAndValues ...any)
- func ZError(ctx context.Context, msg string, err error, keysAndValues ...any)
- func ZInfo(ctx context.Context, msg string, keysAndValues ...any)
- func ZWarn(ctx context.Context, msg string, err error, keysAndValues ...any)
- type Color
- type Logger
- type ZapLogger
- func (l *ZapLogger) Debug(ctx context.Context, msg string, keysAndValues ...any)
- func (l *ZapLogger) Error(ctx context.Context, msg string, err error, keysAndValues ...any)
- func (l *ZapLogger) Info(ctx context.Context, msg string, keysAndValues ...any)
- func (l *ZapLogger) ToZap() *zap.SugaredLogger
- func (l *ZapLogger) Warn(ctx context.Context, msg string, err error, keysAndValues ...any)
- func (l *ZapLogger) WithCallDepth(depth int) Logger
- func (l *ZapLogger) WithName(name string) Logger
- func (l *ZapLogger) WithValues(keysAndValues ...any) Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶
type Logger interface { Debug(ctx context.Context, msg string, keysAndValues ...any) Info(ctx context.Context, msg string, keysAndValues ...any) Warn(ctx context.Context, msg string, err error, keysAndValues ...any) Error(ctx context.Context, msg string, err error, keysAndValues ...any) WithValues(keysAndValues ...any) Logger WithName(name string) Logger WithCallDepth(depth int) Logger }
type ZapLogger ¶
type ZapLogger struct {
// contains filtered or unexported fields
}
func NewZapLogger ¶
func (*ZapLogger) ToZap ¶
func (l *ZapLogger) ToZap() *zap.SugaredLogger
func (*ZapLogger) WithCallDepth ¶
func (*ZapLogger) WithValues ¶
Click to show internal directories.
Click to hide internal directories.