Documentation ¶
Index ¶
- Constants
- Variables
- func NewPercentField() *singleCharField
- type Color
- type ColorField
- type ColorResetField
- type DateField
- type EventReader
- type Field
- type HostnameField
- type LocaleTimeField
- type LogCategoryField
- type LogLevelField
- type MessageField
- type NewLineField
- type PaddingField
- type PercentField
- type ProcessIdField
- type TextField
- type TruncationField
Constants ¶
View Source
const ( LocaleTime = "15:04:05" ISO8601 = "2006-01-02T15:04:05.000" ISO8601WithTzOffset = "2006-01-02T15:04:05.000-07:00" AbsoluteTime = "15:04:05.000" Datetime = "2006/01/02-15:04:05" )
Variables ¶
View Source
var ( ColorReset = &Color{"reset", "\033[0m"} ColorRed = &Color{"red", "\033[31m"} ColorGreen = &Color{"green", "\033[32m"} ColorYellow = &Color{"yellow", "\033[33m"} ColorBlue = &Color{"blue", "\033[34m"} ColorMagenta = &Color{"magenta", "\033[35m"} ColorCyan = &Color{"cyan", "\033[36m"} )
View Source
var ( ErrNilPointer = errors.New("nil pointer") ErrEmptyReader = errors.New("readed all data available") )
Functions ¶
func NewPercentField ¶
func NewPercentField() *singleCharField
Types ¶
type ColorField ¶
type ColorField struct{}
func (*ColorField) WriteTo ¶
func (c *ColorField) WriteTo(w io.Writer, reader *EventReader) (n int, err error)
type ColorResetField ¶
type ColorResetField struct{}
func (*ColorResetField) WriteTo ¶
func (c *ColorResetField) WriteTo(w io.Writer, _ *EventReader) (n int, err error)
type DateField ¶
type DateField struct {
// contains filtered or unexported fields
}
func NewDateField ¶
type EventReader ¶
func NewEventReader ¶
func NewEventReader(e *events.Event) (*EventReader, error)
func (*EventReader) ReadData ¶
func (r *EventReader) ReadData() (any, error)
type HostnameField ¶
type HostnameField struct{}
func (*HostnameField) WriteTo ¶
func (h *HostnameField) WriteTo(w io.Writer, reader *EventReader) (n int, err error)
type LocaleTimeField ¶
type LocaleTimeField = DateField
func NewLocaleTimeField ¶
func NewLocaleTimeField() *LocaleTimeField
type LogCategoryField ¶
type LogCategoryField struct{}
func (*LogCategoryField) WriteTo ¶
func (l *LogCategoryField) WriteTo(w io.Writer, reader *EventReader) (n int, err error)
type LogLevelField ¶
type LogLevelField struct{}
func (*LogLevelField) WriteTo ¶
func (l *LogLevelField) WriteTo(w io.Writer, reader *EventReader) (n int, err error)
type MessageField ¶
type MessageField struct {
// contains filtered or unexported fields
}
func NewMessageField ¶
func NewMessageField(limits string) *MessageField
func (*MessageField) WriteTo ¶
func (m *MessageField) WriteTo(w io.Writer, reader *EventReader) (n int, err error)
type NewLineField ¶
type NewLineField = singleCharField
func NewNewLineField ¶
func NewNewLineField() *NewLineField
type PaddingField ¶
type PaddingField struct { Field // contains filtered or unexported fields }
func NewPaddingField ¶
func NewPaddingField(f Field, p int) *PaddingField
func (*PaddingField) WriteTo ¶
func (p *PaddingField) WriteTo(w io.Writer, reader *EventReader) (n int, err error)
type PercentField ¶
type PercentField = singleCharField
type ProcessIdField ¶
type ProcessIdField struct{}
func (*ProcessIdField) WriteTo ¶
func (p *ProcessIdField) WriteTo(w io.Writer, reader *EventReader) (n int, err error)
type TextField ¶
type TextField struct {
// contains filtered or unexported fields
}
func NewTextField ¶
type TruncationField ¶
type TruncationField struct { Field // contains filtered or unexported fields }
func (*TruncationField) WriteTo ¶
func (t *TruncationField) WriteTo(w io.Writer, reader *EventReader) (n int, err error)
Click to show internal directories.
Click to hide internal directories.