log

package
v0.0.0-...-0b5acb0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Logger instance for quick declarative logging levels
	Logger = logging.MustGetLogger("eth-swap-ap")
)

Functions

func GetLogger

func GetLogger(level logging.Level) func(string, ...interface{})

func InitLogger

func InitLogger(config LogsConfig)

InitLogger initialises the logger.

func LevelForPrefixedLogString

func LevelForPrefixedLogString(str string) (level logging.Level)

func ParsePrefixedLogString

func ParsePrefixedLogString(str string) (level logging.Level, unPrefixed string)

Types

type LogsConfig

type LogsConfig struct {
	Level                        string `json:"level"`
	Filename                     string `json:"filename"`
	MaxFileSizeInMB              int    `json:"maxFileSizeInMB"`
	MaxBackupsOfLogFiles         int    `json:"maxBackupsOfLogFiles"`
	MaxAgeToRetainLogFilesInDays int    `json:"maxAgeToRetainLogFilesInDays"`
	UseConsoleLogger             bool   `json:"useConsoleLogger"`
	UseFileLogger                bool   `json:"useFileLogger"`
	Compress                     bool   `json:"compress"`
}

Jump to

Keyboard shortcuts

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