log

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2025 License: Apache-2.0 Imports: 1 Imported by: 6

Documentation

Overview

Package log provides a simple pluggable logging interface

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debugf

func Debugf(t string, args ...any)

Debugf logs a debug level log message

func Errorf

func Errorf(t string, args ...any)

Errorf logs an error level log message

func Infof

func Infof(t string, args ...any)

Infof logs an info level log message

func Tracef added in v0.9.0

func Tracef(t string, args ...any)

Tracef logs a trace level log message

func Warnf added in v0.11.0

func Warnf(t string, args ...any)

Warnf logs a warn level log message

Types

type Logger

type Logger interface {
	Tracef(msg string, args ...any)
	Debugf(msg string, args ...any)
	Infof(msg string, args ...any)
	Warnf(msg string, args ...any)
	Errorf(msg string, args ...any)
}

Logger interface should be implemented by the logging library you wish to use

var Log Logger

Log can be assigned a proper logger, such as logrus configured to your liking.

type StdLog

type StdLog struct {
	Logger
}

StdLog is a simplistic logger for rig

func (*StdLog) Debugf

func (l *StdLog) Debugf(t string, args ...any)

Debugf prints a debug level log message

func (*StdLog) Errorf

func (l *StdLog) Errorf(t string, args ...any)

Errorf prints an error level log message

func (*StdLog) Infof

func (l *StdLog) Infof(t string, args ...any)

Infof prints an info level log message

func (*StdLog) Tracef added in v0.9.0

func (l *StdLog) Tracef(t string, args ...any)

Tracef prints a debug level log message

func (*StdLog) Warnf added in v0.11.0

func (l *StdLog) Warnf(t string, args ...any)

Warnf prints a warn level log message

Jump to

Keyboard shortcuts

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