log

package
v0.0.0-...-028f1de Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

Functions

func DefaultCommonFields

func DefaultCommonFields() log.Fields

DefaultCommonFields returns preset fields for each log message. All default common fields MUST be prefixed by an underscore to avoid conflict with fields added later.

func GetLogger

func GetLogger() *log.Logger

func InitLog

func InitLog(filename string, logpath string, ignoreRotationError bool)

Types

type CustomLogrusTextFormatter

type CustomLogrusTextFormatter struct {
	LogrusTextFormatter logrus.TextFormatter

	CommonFields logrus.Fields
}

func (*CustomLogrusTextFormatter) Format

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

type Fields

type Fields = log.Fields

Jump to

Keyboard shortcuts

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