logging

package
v0.52.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogLevel added in v0.13.0

type LogLevel int

LogLevel represents levels at which to log

const (
	// LogLevelError logs only error messages
	LogLevelError LogLevel = 8
	// LogLevelInfo logs errors and info messages
	LogLevelInfo LogLevel = 0
	// LogLevelDebug logs errors, info, and debug messages
	LogLevelDebug LogLevel = -4
)

func (LogLevel) Level added in v0.13.0

func (l LogLevel) Level() slog.Level

Level returns the slog log level corresponding with the neoq log level

type Logger

type Logger interface {
	Debug(msg string, args ...any)
	Error(msg string, args ...any)
	Info(msg string, args ...any)
}

Logger interface is the interface that neoq's logger must implement

This interface is a subset of slog.Logger. The slog interface was chosen under the assumption that its likely to be Golang's standard library logging interface.

Jump to

Keyboard shortcuts

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