log

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2023 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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