logger

package
v0.0.0-...-91dbc65 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package logger contains utilities for logging relevant information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Level

type Level uint8

Level represents the logging Level used.

const (
	// DISABLED shows no logs.
	DISABLED Level = iota
	// DEBUG designates fine-grained informational events useful to debug an application.
	DEBUG
	// INFO designates informational messages that highlight the progress of the application at
	// coarse-grained level.
	INFO
	// WARNING displays an alert signaling caution.
	WARNING
	// ERROR designates error events.
	ERROR
	// FATAL shows an error and exits.
	FATAL
)

type Logger

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

Logger contains the logging options.

func New

func New(config config.Logger) (*Logger, error)

New creates a new logger.

func (Logger) Debug

func (l Logger) Debug(args ...interface{})

Debug provides useful information for debugging.

func (Logger) Debugf

func (l Logger) Debugf(format string, args ...interface{})

Debugf is like Debug but takes a formatted message.

func (Logger) Error

func (l Logger) Error(args ...interface{})

Error reports the application errors.

func (Logger) Errorf

func (l Logger) Errorf(format string, args ...interface{})

Errorf is like Error but takes a formatted message.

func (Logger) Fatal

func (l Logger) Fatal(args ...interface{})

Fatal reports the application errors and exits.

func (Logger) Fatalf

func (l Logger) Fatalf(format string, args ...interface{})

Fatalf is like Fatal but takes a formatted message.

func (Logger) Info

func (l Logger) Info(args ...interface{})

Info provides useful information about the server.

func (Logger) Infof

func (l Logger) Infof(format string, args ...interface{})

Infof is like Info but takes a formatted message.

func (Logger) Warning

func (l Logger) Warning(args ...interface{})

Warning reports the application alerts.

func (Logger) Warningf

func (l Logger) Warningf(format string, args ...interface{})

Warningf is like Warning but takes a formatted message.

Jump to

Keyboard shortcuts

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