log

package
v0.0.0-...-4859cea Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2020 License: LGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Checksum = func() string {
	f, err := os.Open(os.Args[0])
	FatalError("Error generating checksum", err)
	hash := sha1.New()
	if _, err := io.Copy(hash, f); err != nil {
		FatalError("Error generating checksum", err)
	}
	err = f.Close()
	FatalError("Error generating checksum", err)
	return hex.EncodeToString(hash.Sum(nil))
}()

Checksum is the checksum of the proxy file.

View Source
var Debugging = false

Debugging represents whether or not the proxy will log debug messages (Its auto updated to whatever is set in the configuration).

Diode is a non-blocking writer that ensures it doesn't cause lag with too much logging.

View Source
var TotalPlayers = 0

TotalPlayers is temporary until events are added.

Functions

func Debug

func Debug() *zerolog.Event

Debug returns a debug logger if debug logging is enabled in the configuration.

func Err

func Err() *zerolog.Event

Err returns a error logger.

func Error

func Error(msg string, err error)

Error logs an error to the console.

func FatalError

func FatalError(str string, err error)

FatalError logs an error to console exits the program.

func Info

func Info() *zerolog.Event

Info returns a logger which has a prefix that indicates a warn.

func Success

func Success(msg string)

Success logs a success message.

func Title

func Title(msg string)

Title updates the title of the terminal.

func Warn

func Warn(msg string)

Warn returns a logger which has a prefix that indicates a warn.

Types

This section is empty.

Jump to

Keyboard shortcuts

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