log

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug added in v0.1.7

func Debug(args ...interface{})

Debug prints debug message if debug mode is enabled

func Error added in v0.1.7

func Error(args ...interface{})

Error prints error message and exits with code 1

func Info added in v0.1.7

func Info(args ...interface{})

Info prints info message

func InitDefault added in v0.1.7

func InitDefault(debugMode bool, secrets []string, isColored bool, e exitor.IExitor)

InitDefault initializes default logger with specific values

func Warn added in v0.1.7

func Warn(args ...interface{})

Warn prints warn message

Types

type ILog

type ILog interface {
	Debug(...interface{})
	Info(...interface{})
	Warn(...interface{})
	Error(...interface{})
}

ILog is the simple logger interface

func Default

func Default() ILog

Default creates a new instance of defaultLogger with default values that can be used as a singleton

func New

func New(debugMode bool, secrets []string, isColored bool, e exitor.IExitor) ILog

New creates a new instance of defaultLogger implementing ILog interface

Jump to

Keyboard shortcuts

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