logging

package
v0.0.0-...-1f1dc5f Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package logging installs the process-level zerolog runtime.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContext

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

FromContext returns the request-scoped zerolog logger.

func Install

func Install(cfg Config) error

Install configures zerolog's process-wide logger and standard-library log output.

func NewLogger

func NewLogger(writer io.Writer, cfg Config) (zerolog.Logger, error)

NewLogger creates a zerolog logger for the provided writer.

Types

type Config

type Config struct {
	Level      zerolog.Level
	Format     string
	Output     string
	Caller     bool
	AppName    string
	AppVersion string
}

Config contains process-level logging infrastructure settings.

func FromAppConfig

func FromAppConfig(cfg configs.Config) Config

FromAppConfig derives logging settings from application config.

Jump to

Keyboard shortcuts

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