logger

package
v0.0.0-...-03cf094 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Log is an instance of the global logrus.Logger

Functions

func InitLogger

func InitLogger(cfg *appconf.SuperKeyWorkerConfig) *logrus.Logger

InitLogger initializes the Sources SuperKey logger

Types

type CustomLoggerFormatter

type CustomLoggerFormatter struct {
	Hostname string
	AppName  string
}

NewCustomLoggerFormatter adds hostname and app name

func NewCustomLoggerFormatter

func NewCustomLoggerFormatter() *CustomLoggerFormatter

NewCustomLoggerFormatter creates a new log formatter

func (*CustomLoggerFormatter) Format

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

Format is the log formatter for the entry

type Marshaler

type Marshaler interface {
	MarshalLog() map[string]interface{}
}

Marshaler is an interface any type can implement to change its output in our production logs.

Jump to

Keyboard shortcuts

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