Documentation ¶
Index ¶
- Constants
- func LogSubsystem(log logger.Logger, subsys Subsystem) logger.Logger
- func OutletsFromConfig(in config.LoggingOutletEnumList) (*logger.Outlets, error)
- func WithSubsystemLoggers(ctx context.Context, log logger.Logger) context.Context
- type EntryFormatter
- type HumanFormatter
- type JSONFormatter
- type LogfmtFormatter
- type MetadataFlags
- type NoFormatter
- type Subsystem
- type SyslogOutlet
- type TCPOutlet
- type WriterOutlet
Constants ¶
View Source
const ( FieldLevel = "level" FieldMessage = "msg" FieldTime = "time" )
View Source
const ( JobField string = "job" SubsysField string = "subsystem" )
View Source
const HumanFormatterDateFormat = time.RFC3339
Variables ¶
This section is empty.
Functions ¶
func OutletsFromConfig ¶
func OutletsFromConfig(in config.LoggingOutletEnumList) (*logger.Outlets, error)
Types ¶
type EntryFormatter ¶
type EntryFormatter interface { SetMetadataFlags(flags MetadataFlags) Format(e *logger.Entry) ([]byte, error) }
type HumanFormatter ¶
type HumanFormatter struct {
// contains filtered or unexported fields
}
func (*HumanFormatter) Format ¶
func (f *HumanFormatter) Format(e *logger.Entry) (out []byte, err error)
func (*HumanFormatter) SetIgnoreFields ¶
func (f *HumanFormatter) SetIgnoreFields(ignore []string)
func (*HumanFormatter) SetMetadataFlags ¶
func (f *HumanFormatter) SetMetadataFlags(flags MetadataFlags)
type JSONFormatter ¶
type JSONFormatter struct {
// contains filtered or unexported fields
}
func (*JSONFormatter) SetMetadataFlags ¶
func (f *JSONFormatter) SetMetadataFlags(flags MetadataFlags)
type LogfmtFormatter ¶
type LogfmtFormatter struct {
// contains filtered or unexported fields
}
func (*LogfmtFormatter) SetMetadataFlags ¶
func (f *LogfmtFormatter) SetMetadataFlags(flags MetadataFlags)
type MetadataFlags ¶
type MetadataFlags int64
const ( MetadataTime MetadataFlags = 1 << iota MetadataLevel MetadataColor MetadataNone MetadataFlags = 0 MetadataAll MetadataFlags = ^0 )
type NoFormatter ¶
type NoFormatter struct{}
func (NoFormatter) SetMetadataFlags ¶
func (f NoFormatter) SetMetadataFlags(flags MetadataFlags)
type Subsystem ¶
type Subsystem string
const ( SubsysReplication Subsystem = "repl" SubsyEndpoint Subsystem = "endpoint" SubsysPruning Subsystem = "pruning" SubsysSnapshot Subsystem = "snapshot" SubsysTransport Subsystem = "transport" SubsysTransportMux Subsystem = "transportmux" SubsysRPC Subsystem = "rpc" SubsysRPCControl Subsystem = "rpc.ctrl" SubsysRPCData Subsystem = "rpc.data" )
type SyslogOutlet ¶
type SyslogOutlet struct { Formatter EntryFormatter RetryInterval time.Duration Facility syslog.Priority // contains filtered or unexported fields }
func (*SyslogOutlet) WriteEntry ¶
func (o *SyslogOutlet) WriteEntry(entry logger.Entry) error
type TCPOutlet ¶
type TCPOutlet struct {
// contains filtered or unexported fields
}
func NewTCPOutlet ¶
type WriterOutlet ¶
type WriterOutlet struct {
// contains filtered or unexported fields
}
func (WriterOutlet) WriteEntry ¶
func (h WriterOutlet) WriteEntry(entry logger.Entry) error
Click to show internal directories.
Click to hide internal directories.