logging

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: Unlicense Imports: 4 Imported by: 0

Documentation

Overview

Package logging provides a succinct logger that supports log levels. The logger is preconfigured to output log entry's with time, date and log level prefixes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Level

type Level int
const (
	Error Level = iota
	Info
	Debug
)

func (Level) String

func (l Level) String() string

func (*Level) UnmarshalJSON

func (l *Level) UnmarshalJSON(b []byte) error

func (*Level) UnmarshalYAML

func (l *Level) UnmarshalYAML(n *yaml.Node) error

type Logger

type Logger interface {
	Error(logMessage any)
	Info(logMessage any)
	Debug(logMessage any)
}

func New

func New(l Level) Logger

New returns an instance of Logger configured to output log entry of the passed Level or higher.

Jump to

Keyboard shortcuts

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