logrus-prefixed-formatter – github.com/x-cray/logrus-prefixed-formatter Index | Files | Directories

package prefixed

import "github.com/x-cray/logrus-prefixed-formatter"

Index

Types

type TextFormatter

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 of just the time passed since beginning of execution.
	ShortTimestamp bool

	// Timestamp format 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
}

func (*TextFormatter) Format

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

Source Files

formatter.go

Directories

PathSynopsis
examples
Version
v0.1.0
Published
Oct 27, 2015
Platform
js/wasm
Imports
8 packages
Last checked
1 month ago

Tools for package owners.