logging

package
v0.9.9-1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHook

func AddHook(h zerolog.Hook)

func Debug

func Debug() *zerolog.Event

func DiscardLogger

func DiscardLogger()

func Err

func Err(err error) *zerolog.Event

func Error

func Error() *zerolog.Event

func Fatal

func Fatal() *zerolog.Event

func FormatLogEntryHTML

func FormatLogEntryHTML(level zerolog.Level, message string, buf []byte) []byte

func FormatMessageToHTMLBytes

func FormatMessageToHTMLBytes(msg string, buf []byte) ([]byte, error)

FormatMessageToHTMLBytes converts text with ANSI color codes to HTML with class names. ANSI codes are mapped to classes via a static map, and reset codes ([0m) close all spans. Time complexity is O(n) with minimal allocations.

func GetLogger

func GetLogger() *zerolog.Logger

func Info

func Info() *zerolog.Event

func InitLogger

func InitLogger(out io.Writer)

func Panic

func Panic() *zerolog.Event

func Trace

func Trace() *zerolog.Event

func Warn

func Warn() *zerolog.Event

func With

func With() zerolog.Context

func WithLevel

func WithLevel(level zerolog.Level) *zerolog.Event

Types

This section is empty.

Jump to

Keyboard shortcuts

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