logger

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(format string, v ...interface{})

Prints a debug message

func Error

func Error(format string, v ...interface{})

Prints an error message

func Fatal

func Fatal(format string, v ...interface{})

Prints a fatal message

func Info

func Info(format string, v ...interface{})

Prints an info message

func SetLogLevel

func SetLogLevel(level LogLevel)

SetLogLevel Sets the logger's verbosity level

func System

func System(format string, v ...interface{})

func Warn

func Warn(format string, v ...interface{})

Prints a warning message

Types

type LogLevel

type LogLevel uint8

A logger's level, valued 0-6 where lower levels higher verbosity

const (
	// Print everything
	LogLevelAll LogLevel = iota

	// Print debug, info, warning, errors and fatal errors
	LogLevelDebug

	// Print info, warning, errors and fatal errors
	LogLevelInfo

	// Print warnings, errors and fatal errors
	LogLevelWarn

	// Print only errors and fatal errors
	LogLevelError

	// Print only fatal errors
	LogLevelFatal

	// Print nothing. Effectively disables logging
	LogLevelNone
)

Jump to

Keyboard shortcuts

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