log

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: MIT Imports: 7 Imported by: 7 modules, 10 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 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