logger

package
v1.1.18 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2025 License: Unlicense Imports: 11 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Encrypting bool
View Source
var Location = Get_Location_Windows("America/New_York")
View Source
var LogKeyBytes []byte
View Source
var ZoneInfoFS embed.FS

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 Get_Location_Windows added in v1.1.16

func Get_Location_Windows(location_string string) *time.Location

func Get_location added in v1.1.13

func Get_location(name string) *time.Location

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.

func SetLocation added in v1.1.13

func SetLocation(location_string string)

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) FormatDateString added in v1.1.18

func (w *Wrapper) FormatDateString(now *time.Time) (result string)

func (*Wrapper) FormatTime added in v1.1.9

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

func (*Wrapper) FormatTimeString added in v1.1.18

func (w *Wrapper) FormatTimeString(now *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)

func (*Wrapper) GetNowDateString added in v1.1.18

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

func (*Wrapper) GetNowTimeOBJ added in v1.1.17

func (w *Wrapper) GetNowTimeOBJ() (result time.Time)

func (*Wrapper) GetNowTimeString added in v1.1.18

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

Jump to

Keyboard shortcuts

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