logging

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReqId                = "RequestId"
	OpenTelemetryTraceId = "OpenTelemetryTraceId"
	DEBUG                = "DEBUG"
	INFO                 = "INFO"
	WARN                 = "WARN"
	ERROR                = "ERROR"
	UNKNOWN              = "UNKNOWN" // Indicate other environment
	DefaultTraceIdKey    = "reqTraceId"
)

Variables

This section is empty.

Functions

func New

func New(level string, dest io.Writer, opts ...Option) logger.Logger

Init creates an ISLogger instance, a structured logger using the JSON Handler. Creating this logger sets this as the default logger, so any logging after this which goes through the standard logging package will also produce JSON structured logs.

Types

type Option added in v0.28.0

type Option func(l *slogger)

func WithTraceIdKey added in v0.28.0

func WithTraceIdKey(key string) Option

Jump to

Keyboard shortcuts

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