log

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package log provides common functions for logging.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(format string, args ...any)

Debug logs a debug message at the root path.

func Error

func Error(format string, args ...any)

Error logs an error message at the root path.

func Info

func Info(format string, args ...any)

Info logs an info message at the root path.

func Warn

func Warn(format string, args ...any)

Warn logs a warning message at the root path.

Types

type Logger added in v0.11.0

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

Logger provides a mechanism by which log messages can be output.

func Path added in v0.11.0

func Path(path string) Logger

Path creates a new Logger at the specified path.

func (Logger) Debug added in v0.11.0

func (l Logger) Debug(format string, args ...any)

Debug logs a debug message.

func (Logger) DebugEnabled added in v0.11.0

func (l Logger) DebugEnabled() bool

DebugEnabled returns whether this Logger will print debug messages.

func (Logger) Error added in v0.11.0

func (l Logger) Error(format string, args ...any)

Error logs an error message.

func (Logger) Info added in v0.11.0

func (l Logger) Info(format string, args ...any)

Info logs an info message.

func (Logger) Path added in v0.11.0

func (l Logger) Path(path string) Logger

Path creates a new Logger by appending the specified path to the current logger's path.

func (Logger) Warn added in v0.11.0

func (l Logger) Warn(format string, args ...any)

Warn logs a warning message.

Jump to

Keyboard shortcuts

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