support

package
v0.0.0-...-e766dbd Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

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

Logger is a multi-level logger, supporting trace, info, warning and error levels that can be enabled/disabled independently.

func NewLogger

func NewLogger(traceDest, infoDest, warningDest, errorDest io.Writer) *Logger

NewLogger returns a new logger instance configured with the given destination for each level. Setting any destination to nil will disable the logging (log will be sent to ioutil.Discard). Common destinations are os.Stdout and os.Stderr.

func (*Logger) ERROR

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

ERROR logs error messages, used to report actual issues that might need to be fixed.

func (*Logger) INFO

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

INFO logs informational messages, used for reporting back informational messages that are generally useful.

func (*Logger) TRACE

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

TRACE logs trace messages, used mostly for debugging.

func (*Logger) TraceEnabled

func (l *Logger) TraceEnabled() bool

TraceEnabled returns true if tracing was enabled. Used to enable output for external code (like unitybridge).

func (*Logger) WARNING

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

WARNING logs warning messages, used to report anything that might be problematic but is not considered an error.

Jump to

Keyboard shortcuts

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