zerolog

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package zerolog renders pry records with rs/zerolog. It is the default driver and the only package here that imports zerolog.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Json

func Json() io.Writer

Json is stdout. It also sets zerolog's global timestamp field name, which affects every zerolog logger in the process.

func Plain

func Plain() io.Writer

Plain is human-readable console output. Colour is dropped when stdout is not a TTY.

Types

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

func New

func New(out io.Writer, options ...Option) *Driver

New builds the driver. zerolog is opened at trace because the gate is the logger's — filtering twice would silently make the stricter level win.

func (*Driver) Log

func (d *Driver) Log(r pry.Record)

type Option

type Option func(d *Driver)

func WithCaller

func WithCaller() Option

WithCaller adds the file and line of the call site.

The skip count walks Logger.X -> log -> Driver.Log -> here, so it belongs to that chain rather than to this file. TestCallerPointsAtTheCallSite guards it.

Jump to

Keyboard shortcuts

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