logger

package module
v0.0.0-...-86bd3f3 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: MIT Imports: 6 Imported by: 40

README

Logger

This project is serve logger package for Golang project.

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

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

Debug sends a debug log message.

func DisableTime

func DisableTime()

DisableTime hides time in log messages.

func EnableDebug

func EnableDebug()

EnableDebug increases logging, more verbose (debug)

func Error

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

Error sends an error log message.

func Fatal

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

Fatal sends a fatal log message and stop the execution of the program.

func Info

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

Info sends an info log message.

func SetLogLevel

func SetLogLevel(l LogLevel)

SetLogLevel set the log level

func Warn

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

Warn sends a warn log message.

Types

type LogLevel

type LogLevel uint32

LogLevel type.

const (
	// LevelFatal should be used in fatal situations, the app will exit.
	LevelFatal LogLevel = iota

	// LevelError should be used when someone should really look at the error.
	LevelError

	// LevelWarn should be used when some logic on failure.
	LevelWarn

	// LevelInfo should be used during normal operations.
	LevelInfo

	// LevelDebug should be used only during development.
	LevelDebug
)

func (LogLevel) String

func (l LogLevel) String() string

Jump to

Keyboard shortcuts

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