log

package
v0.0.0-...-e8a8f99 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get() *logrus.Logger

Get returns the initialization of logrus.Logger.

func GetRaw

func GetRaw() *logrus.Logger

GetRaw returns the rawLog.

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{}

RawFormatter Formatter without any formatter.s

func (*RawFormatter) Format

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

Format returns byte array from logrus.Entry.

type TranslationFormatter

type TranslationFormatter struct {
	*prefixed.TextFormatter
}

TranslationFormatter Formatter with *prefixed.TextFormatter.

Jump to

Keyboard shortcuts

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