logging

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lb

func Lb() string

Will return \n except if rt is windows. Then returns \r\n.

Types

type Logger

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

func New

func New() *Logger

New creates a new Logger.

func (*Logger) Alert

func (l *Logger) Alert(format string, a ...interface{})

Alert will print message with format and prefix of current date and time in red color.

func (*Logger) Error

func (l *Logger) Error(err error)

Error will print message with format and prefix of current date and time and then exit 1.

func (*Logger) Notice

func (l *Logger) Notice(format string, a ...interface{})

Notice will print message with format and prefix of current date and time in green color.

func (*Logger) Print

func (l *Logger) Print(format string, a ...interface{})

Print will print message with format and prefix of current date and time.

func (*Logger) Warning

func (l *Logger) Warning(format string, a ...interface{})

Warning will print message with format and prefix of current date and time in yellow color.

Jump to

Keyboard shortcuts

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