logger

package
v1.1.12 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 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 GetDB added in v1.1.4

func GetDB() *bolt_api.DB

func Init

func Init()

func ItoB added in v1.1.4

func ItoB(v uint64) []byte

https://github.com/boltdb/bolt#autoincrementing-integer-for-the-bucket itob returns an 8-byte big endian representation of v.

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
}

type Wrapper added in v1.1.9

type Wrapper struct {
	*logrus.Logger
}
var Log *Wrapper

var Log *logrus.Logger

func New

func New(config *types.ConfigFile) *Wrapper

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 {

func (*Wrapper) FormatTime added in v1.1.9

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

func (*Wrapper) GetFormattedTimeString added in v1.1.9

func (w *Wrapper) GetFormattedTimeString() (result string)

func (*Wrapper) GetFormattedTimeStringOBJ added in v1.1.9

func (w *Wrapper) GetFormattedTimeStringOBJ() (result_string string, result_time time.Time)

func (*Wrapper) GetMessages added in v1.1.10

func (w *Wrapper) GetMessages(count int) (messages []string)

Jump to

Keyboard shortcuts

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