logging

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JsonFormat LogFormat = "json"
	TextFormat LogFormat = "text"
	TimeFormat string    = "2006-01-02T15:04:05.000000"
)

Variables

This section is empty.

Functions

func FromCtx

func FromCtx(ctx context.Context) *zerolog.Logger

func GetDefault

func GetDefault() *zerolog.Logger

GetDefault returns the default logger

func New

func New(config LoggerConfig) zerolog.Logger

Types

type LogFormat

type LogFormat string

type LoggerConfig

type LoggerConfig struct {
	Format LogFormat
	Level  zerolog.Level
	Output io.Writer
}

Jump to

Keyboard shortcuts

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