log

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: MIT Imports: 2 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddWriter

func AddWriter(w rogu.Writer) rogu.Logger

AddWriter adds another writer to the logger.

func Close added in v0.3.0

func Close() error

func Copy

func Copy() rogu.Logger

Copy creates and returns a copy of the Logger.

func Debug

func Debug() *rogu.Event

Trace creates a new log Event with level debug.

func Error

func Error() *rogu.Event

Trace creates a new log Event with level error.

func Fatal

func Fatal() *rogu.Event

Trace creates a new log Event with level fatal.

When commited, the programm will exit with exit code 1.

func Info

func Info() *rogu.Event

Trace creates a new log Event with info.

func Panic

func Panic() *rogu.Event

Trace creates a new log Event with level panic.

When commited, the program will panic at the called point.

func SetCaller

func SetCaller(enable bool) rogu.Logger

SetCaller enabled or disables attaching the caller file and line to the event.

func SetLevel

func SetLevel(lvl level.Level) rogu.Logger

SetLevel sets the minum log leven which will be written.

func SetWriter

func SetWriter(w rogu.Writer) rogu.Logger

SetWriter sets the specified writer to the logger.

func Tagged

func Tagged(tag string) rogu.Logger

Tagged returns a new logger which references the origin logger but attaches the given tag to every created Entry. Changes made to the underlying logger will be projected to the created logger.

func Trace

func Trace() *rogu.Event

Trace creates a new log Event with level trace.

func Warn

func Warn() *rogu.Event

Trace creates a new log Event with level warn.

func WithLevel added in v0.4.0

func WithLevel(lvl level.Level) *rogu.Event

WithLevel returns a new log Event with the given level.

Types

This section is empty.

Jump to

Keyboard shortcuts

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