zerolog

package module
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package zerolog provides a zerolog hook that mirrors log messages into webpprof without adding zerolog to the core module.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Profile

func Profile(logger zerolog.Logger) zerolog.Logger

Profile attaches a webpprof hook to logger using the default profiler.

func ProfileWith

func ProfileWith(p *webpprof.Profiler, logger zerolog.Logger) zerolog.Logger

ProfileWith attaches a webpprof hook to logger using p. The returned logger retains all existing writers, levels, context fields, and hooks.

Types

type Hook

type Hook struct {
	Profiler *webpprof.Profiler
}

Hook records zerolog events after zerolog accepts their level.

func (Hook) Run

func (h Hook) Run(event *zerolog.Event, level zerolog.Level, message string)

Run implements zerolog.Hook.

Jump to

Keyboard shortcuts

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