Documentation ¶
Index ¶
- func CreateLogger(ctx context.Context, logger string) *logrus.Entry
- func Logger(name string) *logrus.Logger
- func LoggerEntry(name string) *logrus.Entry
- func LoggerEntryWithTag(name string, tag string) *logrus.Entry
- func Loggers() map[string]*logrus.Logger
- func SetConfigureLoggerHandler(handler func(string, *logrus.Logger))
- type StringValueFormatter
- type TextFormatter
- type ValueFormatter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateLogger ¶ added in v1.6.0
func LoggerEntry ¶
func LoggerEntryWithTag ¶ added in v1.6.0
func SetConfigureLoggerHandler ¶ added in v1.6.0
Types ¶
type StringValueFormatter ¶ added in v1.6.0
type StringValueFormatter string
StringValueFormatter is a string that provides value formatting for logging multiline string value.
func (StringValueFormatter) Print ¶ added in v1.6.0
func (f StringValueFormatter) Print(b *bytes.Buffer)
Print prints the string value to bytes buffer.
type TextFormatter ¶ added in v1.6.0
type TextFormatter struct { // Set to true to bypass checking for a TTY before outputting colors. ForceColors bool // Force disabling colors. DisableColors bool // Disable timestamp logging. useful when output is redirected to logging // system that already adds timestamps. DisableTimestamp bool // Enable logging the full timestamp when a TTY is attached instead of just // the time passed since beginning of execution. FullTimestamp bool // TimestampFormat to use for display when a full timestamp is printed TimestampFormat string // The fields are sorted by default for a consistent output. For applications // that log extremely frequently and don't use the JSON formatter this may not // be desired. DisableSorting bool // Disables the truncation of the level text to 4 characters. DisableLevelTruncation bool // QuoteEmptyFields will wrap empty fields in quotes if true QuoteEmptyFields bool sync.Once // contains filtered or unexported fields }
TextFormatter formats logs into text
type ValueFormatter ¶ added in v1.6.0
Click to show internal directories.
Click to hide internal directories.