logger

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: Unlicense Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Encrypting bool
View Source
var Location *time.Location
View Source
var LogKeyBytes []byte

Functions

func CloseDB added in v1.1.2

func CloseDB()

func FormatTime

func FormatTime(input_time *time.Time) (result string)

func GetMessages added in v1.1.2

func GetMessages(count int) (messages []string)

func Init

func Init()

func New

func New(config *types.ConfigFile) *logrus.Logger

so apparently The limitation arises due to the Go language's initialization order: Package-level variables are initialized before main() is called. Functions in main() execute after package-level initializations. something something , singleton func GetLogger( config *types.ConfigFile ) *logrus.Logger {

Types

type CustomJSONFormatter

type CustomJSONFormatter struct {
	logrus.JSONFormatter
}

func (*CustomJSONFormatter) Format

func (f *CustomJSONFormatter) Format(entry *logrus.Entry) ([]byte, error)

type CustomLogrusWriter

type CustomLogrusWriter struct {
	io.Writer
}

func (*CustomLogrusWriter) Write

func (w *CustomLogrusWriter) Write(p []byte) (n int, err error)

type CustomTextFormatter

type CustomTextFormatter struct {
	logrus.TextFormatter
}

Jump to

Keyboard shortcuts

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