logger

package
v0.0.0-...-67397eb Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(formatAsJson bool, options ...Option) *slog.Logger

func NewConnectRequestLogger

func NewConnectRequestLogger(l *slog.Logger, status int, req connect.AnyRequest, resp connect.AnyResponse) *connectRequestLogger

Types

type Config

type Config struct {
	Level int  `yaml:"level" json:"level,omitempty" mapstructure:"level" default:"0"`
	Json  bool `yaml:"json" json:"json,omitempty" mapstructure:"json" default:"false"`
}

type Option

type Option func(*slog.HandlerOptions)

func WithLevel

func WithLevel(level slog.Level) Option

type RequestTimeKey

type RequestTimeKey struct{}

type SpanIDKey

type SpanIDKey struct{}

type TraceIDKey

type TraceIDKey struct{}

Jump to

Keyboard shortcuts

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