Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
FallbackLogDevice defines the fallback destination for when _GOLLUM_ is unavailable / not used
Functions ¶
func NewConsoleFormatter ¶
func NewConsoleFormatter() *prefixed.TextFormatter
NewConsoleFormatter returns a a ConsoleFormatter reference
Types ¶
type LogrusHookBuffer ¶
type LogrusHookBuffer struct {
// contains filtered or unexported fields
}
LogrusHookBuffer implements logrus.Hook and is used to pools log messages during startup when the desired log destination (_GOLLUM_ stream or fallbackLogDevice) is not yet available or known. During normal operation it relays messages to targetHook and/or targetWriter.
func NewLogrusHookBuffer ¶
func NewLogrusHookBuffer() LogrusHookBuffer
NewLogrusHookBuffer returns a LogrusHookBuffer instance
func (*LogrusHookBuffer) Fire ¶
func (lhb *LogrusHookBuffer) Fire(logrusEntry *logrus.Entry) error
Fire and Levels() implement the logrus.Hook interface.
func (*LogrusHookBuffer) Levels ¶
func (lhb *LogrusHookBuffer) Levels() []logrus.Level
Levels and Fire() implement the logrus.Hook interface
func (*LogrusHookBuffer) Purge ¶
func (lhb *LogrusHookBuffer) Purge()
Purge sends stored messages to targetHook and/or targetWriter and empties the buffer.
func (*LogrusHookBuffer) SetTargetHook ¶
func (lhb *LogrusHookBuffer) SetTargetHook(hook logrus.Hook)
SetTargetHook sets the logrus hook to whose .Fire() method messages should be relayed
func (*LogrusHookBuffer) SetTargetWriter ¶
func (lhb *LogrusHookBuffer) SetTargetWriter(writer io.Writer)
SetTargetWriter sets the io.Writer where messages should be written