writer

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2025 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewErrorLog

func NewErrorLog(logger *bl.Logger) *log.Logger

NewErrorLog creates a standard library logger that writes to a zerolog Logger This can be used as the ErrorLog field in http.Server

Types

type ZerologWriter

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

ZerologWriter implements io.Writer by redirecting writes to a zerolog logger

func (*ZerologWriter) Write

func (w *ZerologWriter) Write(p []byte) (n int, err error)

Write implements the io.Writer interface by logging the message to the embedded zerolog logger

Jump to

Keyboard shortcuts

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