log

package
v1.7.0-rc13 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: MPL-2.0 Imports: 5 Imported by: 188

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get() *logrus.Logger

func GetRaw

func GetRaw() *logrus.Logger

func LoadTranslations

func LoadTranslations(thing map[string]interface{})

LoadTranslations takes a map[string]interface and flattens it to map[string]string Because translations have been loaded - we internally override log the formatter Nested entries are accessible using dot notation. example: `{"foo": {"bar": "baz"}}` flattened: `foo.bar: baz`

Types

type FlatMap

type FlatMap map[string]string

FlatMap is alias of map[string]string

func Flatten

func Flatten(data map[string]interface{}) (flatmap FlatMap, err error)

Flatten transform complex map to flatten map

type RawFormatter

type RawFormatter struct{}

func (*RawFormatter) Format

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

type TranslationFormatter

type TranslationFormatter struct {
	*logrus.TextFormatter
}

func (*TranslationFormatter) Format

func (t *TranslationFormatter) Format(entry *logrus.Entry) ([]byte, error)

Jump to

Keyboard shortcuts

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