tuxlogi

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 0 Imported by: 6

README

tuxlogi

PkgGoDev Build Tests Lint CodeQL Go Report Card

A go library that provides just a generic level logging interface.

The interface can be used to define an abstract logger in libraries or any command line utilties, and allow users to customize the concrete logging implementation to use.

This is currently used by cablemodemutil, cablemodemcli and other projects in go used by tuxgal and tuxgalhomelab.

Documentation

Overview

Package tuxlogi exposes a generic level logging interface decoupled from any single logging implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	// Logs the specified arguments at Trace level using the default format
	// (i.e. separated by space).
	Trace(args ...interface{})
	// Logs the specified arguments at Trace level using the specified format.
	Tracef(format string, args ...interface{})
	// Logs just a new empty line only if the logging level is at least Trace.
	TraceEmpty()
	// Logs the specified arguments at Debug level using the default format
	// (i.e. separated by space).
	Debug(args ...interface{})
	// Logs the specified arguments at Debug level using the specified format.
	Debugf(format string, args ...interface{})
	// Logs just a new empty line only if the logging level is at least Debug.
	DebugEmpty()
	// Logs the specified arguments at Info level using the default format
	// (i.e. separated by space).
	Info(args ...interface{})
	// Logs the specified arguments at Info level using the specified format.
	Infof(format string, args ...interface{})
	// Logs just a new empty line only if the logging level is at least Info.
	InfoEmpty()
	// Logs the specified arguments at Warn level using the default format
	// (i.e. separated by space).
	Warn(args ...interface{})
	// Logs the specified arguments at Warn level using the specified format.
	Warnf(format string, args ...interface{})
	// Logs just a new empty line only if the logging level is at least Warn.
	WarnEmpty()
	// Logs the specified arguments at Error level using the default format
	// (i.e. separated by space).
	Error(args ...interface{})
	// Logs the specified arguments at Error level using the specified format.
	Errorf(format string, args ...interface{})
	// Logs just a new empty line only if the logging level is at least Error.
	ErrorEmpty()
	// Logs the specified arguments at Fatal level using the default format
	// (i.e. separated by space).
	Fatal(args ...interface{})
	// Logs the specified arguments at Fatal level using the specified format.
	Fatalf(format string, args ...interface{})
	// Logs the specified arguments without any levels using the default format
	// (i.e. separated by space). Note that timestamp and log level will not
	// be printed when logging using this function.
	Print(args ...interface{})
	// Logs the specified arguments without any levels using the specified
	// format. Note that timestamp and log level will not be printed when
	// logging using this function.
	Printf(format string, args ...interface{})
}

Logger represents a generic level logging interface decoupled from any single logging implementation.

Jump to

Keyboard shortcuts

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