log

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2025 License: MIT Imports: 7 Imported by: 11

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 IsNamespaceDebugEnabled

func IsNamespaceDebugEnabled(namespace string) bool

IsNamespaceDebugEnabled returns whether debug level is enabled for the specified namespace.

func Warn

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

Warn logs a warning message at the root path.

Types

type Logger

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

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

func Namespace

func Namespace(namespace string) Logger

Namespace creates a new Logger with the specified namespace.

func (Logger) Debug

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

Debug logs a debug message.

func (Logger) Error

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

Error logs an error message.

func (Logger) Info

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

Info logs an info message.

func (Logger) IsDebugEnabled

func (l Logger) IsDebugEnabled() bool

IsDebugEnabled returns whether this Logger will print debug messages.

func (Logger) Warn

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