Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // UserOut is the customized logrus log used for direct user output UserOut = log.New() // UserErr is the customized logrus log used for direct user stderr UserErr = log.New() // UserOutFormatter is the specialized formatter for UserOut UserOutFormatter = new(TextFormatter) // JSONOutput is a bool telling whether we're outputting in json. Set by command-line args. JSONOutput = false )
Functions ¶
Types ¶
type ErrorWriter ¶ added in v1.21.5
type ErrorWriter struct{}
ErrorWriter allows writing stderr Splitting to stderr approach from https://huynvk.dev/blog/4-tips-for-logging-on-gcp-using-golang-and-logrus
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 the full timestamp when a TTY is attached instead of
// 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
// QuoteEmptyFields will wrap empty fields in quotes if true
QuoteEmptyFields bool
sync.Once
// contains filtered or unexported fields
}
TextFormatter formats logs into text. This is a specialization of https://github.com/sirupsen/logrus/blob/master/text_formatter.go It's intended to be used for all user-oriented output from DDEV
Click to show internal directories.
Click to hide internal directories.