logger

package
v0.0.0-...-8bff5d1 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddOut

func AddOut(out ...io.Writer)

AddOut adds n writers.

func Debug

func Debug(args ...interface{})

Debug provides useful information for debugging.

func Debugf

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

Debugf is like Debug but takes a formatted message.

func Disable

func Disable()

Disable turns off the logger.

func Error

func Error(args ...interface{})

Error reports the application errors.

func Errorf

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

Errorf is like Error but takes a formatted message.

func Fatal

func Fatal(args ...interface{})

Fatal reports the application errors and exists.

func Fatalf

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

Fatalf is like Fatal but takes a formatted message.

func Info

func Info(args ...interface{})

Info provides useful information about the server.

func Infof

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

Infof is like Info but takes a formatted message.

func SetDevelopment

func SetDevelopment(dev bool)

SetDevelopment enables/disables the development mode.

func SetOut

func SetOut(w ...io.Writer)

SetOut sets the writers where the information will be logged.

func ShowTimestamp

func ShowTimestamp(show bool)

ShowTimestamp determines where the timestamp will be logged or not.

Types

type Logger

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

Logger contains the logging options.

func New

func New(development, showTimestamp bool, out ...io.Writer) *Logger

New creates a new logger.

Jump to

Keyboard shortcuts

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