zerolog

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2025 License: MIT Imports: 3 Imported by: 1

Documentation

Overview

Package zerolog provides an implementation of golog.Logger using rs/zerolog.

Index

Constants

This section is empty.

Variables

View Source
var CallerSkipFrameCount = zerolog.CallerSkipFrameCount + 1

CallerSkipFrameCount is the number of stack frames to skip to find the caller. It is set to zerolog.CallerSkipFrameCount + 1 to account for the golog wrapper.

Functions

func New

func New() golog.Logger

New creates a new Logger with default configuration.

Defaults:

  • Level: LevelInfo
  • Writer: os.Stdout
  • Timestamps: Enabled
  • Caller Info: Enabled

Example:

l := New()
l.Info("Starting application")

func NewWith

func NewWith(log zerolog.Logger) golog.Logger

NewWith creates a new Logger with the specified configuration.

Example:

l := NewWith(zerolog.New(os.Stdout))
l.Debug("Debugging enabled")

Types

This section is empty.

Jump to

Keyboard shortcuts

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