logger

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, args ...any)

Debug logs a debug message

func DebugJson

func DebugJson(msg string, obj any)

Debug logs a debug message

func Error

func Error(msg string, args ...any)

Error logs an error message

func ErrorJson

func ErrorJson(msg string, obj any)

Error logs a error message

func Fatal

func Fatal(msg string, args ...any)

Fatal logs a fatal message and exits

func FatalJson

func FatalJson(msg string, obj any)

Fatal logs a fatal message and exits

func Info

func Info(msg string, args ...any)

Info logs an info message

func InfoJson

func InfoJson(msg string, obj any)

Info logs a info message

func Log

func Log(level slog.Level, msg string, args ...any)

Log logs a message with the given level

func LogJson

func LogJson(level slog.Level, msg string, obj any)

Log logs a message with the given level

func RemoteCaptureError added in v0.0.20

func RemoteCaptureError(err error)

func RemoteCaptureMessage added in v0.0.20

func RemoteCaptureMessage(msg string)

func SetRemote added in v0.0.19

func SetRemote(remote port.IRemoteLog)

func SetRemoteContext added in v0.0.20

func SetRemoteContext(key string, context map[string]any)

func SetRemoteTag added in v0.0.20

func SetRemoteTag(key string, value string)

func Warn

func Warn(msg string, args ...any)

Warn logs a warning message

func WarnJson

func WarnJson(msg string, obj any)

Warn logs a warning message

Types

type Logger

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

Logger represents shared logger

func PrepareLogger

func PrepareLogger(ctx context.Context, level string) *Logger

func (*Logger) Debug

func (l *Logger) Debug(msg string, args ...any)

Debug logs a debug message

func (*Logger) DebugJson

func (l *Logger) DebugJson(msg string, obj any)

Debug logs a debug message

func (*Logger) Error

func (l *Logger) Error(msg string, args ...any)

Error logs an error message

func (*Logger) ErrorJson

func (l *Logger) ErrorJson(msg string, obj any)

Error logs a error message

func (*Logger) Fatal

func (l *Logger) Fatal(msg string, args ...any)

Fatal logs a fatal message and exits

func (*Logger) FatalJson

func (l *Logger) FatalJson(msg string, obj any)

Fatal logs a fatal message and exits

func (*Logger) Info

func (l *Logger) Info(msg string, args ...any)

Info logs an info message

func (*Logger) InfoJson

func (l *Logger) InfoJson(msg string, obj any)

Info logs an info message

func (*Logger) Log

func (l *Logger) Log(level slog.Level, msg string, args ...any)

Log logs a message with the given level

func (*Logger) LogJson

func (l *Logger) LogJson(level slog.Level, msg string, obj any)

Log logs a message with the given level

func (*Logger) Warn

func (l *Logger) Warn(msg string, args ...any)

Warn logs a warning message

func (*Logger) WarnJson

func (l *Logger) WarnJson(msg string, obj any)

Warn logs a warning message

Jump to

Keyboard shortcuts

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