log

package
v0.1.0-M4 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: Apache-2.0, EPL-2.0 Imports: 12 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configure

func Configure(cfg *Config)

Configure applies the full configuration of the logger instance based on the provided configuration

func Debug

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

Debug logs a message at level Debug on the standard logger.

func DebugErr

func DebugErr(err error, format string, args ...interface{})

DebugErr logs a message at level Debug on the standard logger.

func Error

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

Error logs a message at level Error on the standard logger.

func ErrorErr

func ErrorErr(err error, format string, args ...interface{})

ErrorErr logs a message at level Error on the standard logger.

func Fatal

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

Fatal logs a message at level Fatal on the standard logger then the process will exit with status set to 1.

func FatalErr

func FatalErr(err error, format string, args ...interface{})

FatalErr logs a message at level Fatal on the standard logger then the process will exit with status set to 1.

func Info

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

Info logs a message at level Info on the standard logger.

func InfoErr

func InfoErr(err error, format string, args ...interface{})

InfoErr logs a message at level Info on the standard logger.

func NewError

func NewError(message string) error

NewError returns an error message.

func NewErrorf

func NewErrorf(format string, args ...interface{}) error

NewErrorf formats according to a format specifier and returns an error message.

func Panic

func Panic(format string, args ...interface{})

Panic logs a message at level Panic on the standard logger.

func PanicErr

func PanicErr(err error, format string, args ...interface{})

PanicErr logs a message at level Panic on the standard logger.

func Trace

func Trace(format string, args ...interface{})

Trace logs a message at level Trace on the standard logger.

func TraceErr

func TraceErr(err error, format string, args ...interface{})

TraceErr logs a message at level Trace on the standard logger.

func Warn

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

Warn logs a message at level Warn on the standard logger.

func WarnErr

func WarnErr(err error, format string, args ...interface{})

WarnErr logs a message at level Warn on the standard logger.

Types

type Config

type Config struct {
	LogFile       string `json:"log_file,omitempty"`
	LogLevel      string `json:"log_level,omitempty"`
	LogFileSize   int    `json:"log_file_size,omitempty"`
	LogFileCount  int    `json:"log_file_count,omitempty"`
	LogFileMaxAge int    `json:"log_file_max_age,omitempty"`
	Syslog        bool   `json:"syslog,omitempty"`
}

Config represents the configuration options to be set for logging

Jump to

Keyboard shortcuts

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