Documentation ¶
Index ¶
- type FieldMapMarshaller
- type FieldReporterFunc
- type FormatFunc
- type FormatfFunc
- type LogField
- type LogFieldFormat
- type LogFieldMarshaller
- type LogFields
- type LogObject
- type LogObjectFields
- type LogObjectMarshaller
- type LogObjectMetricCollector
- type LogObjectWriter
- type LogStringer
- type MarshallerFactory
- type MsgFormatConfig
- func (v MsgFormatConfig) FmtLogObject(a ...interface{}) string
- func (v MsgFormatConfig) FmtLogStruct(a interface{}) (LogObjectMarshaller, string)
- func (v MsgFormatConfig) FmtLogStructOrObject(a interface{}) (LogObjectMarshaller, string)
- func (v MsgFormatConfig) PrepareMutedLogObject(a ...interface{}) LogObjectMarshaller
- type MsgTemplate
- type MutedLogObjectMarshaller
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FieldMapMarshaller ¶
type FieldMapMarshaller map[string]interface{}
func (FieldMapMarshaller) MarshalLogFields ¶
func (v FieldMapMarshaller) MarshalLogFields(w LogObjectWriter)
type FieldReporterFunc ¶
type FieldReporterFunc func(collector LogObjectMetricCollector, fieldName string, v interface{})
type FormatFunc ¶
type FormatFunc func(...interface{}) string
type FormatfFunc ¶
type LogField ¶
type LogField struct { Name string Value interface{} }
func (LogField) MarshalLogFields ¶
func (v LogField) MarshalLogFields(w LogObjectWriter)
func (LogField) MarshalLogObject ¶
func (v LogField) MarshalLogObject(w LogObjectWriter, _ LogObjectMetricCollector) (string, bool)
type LogFieldFormat ¶
func (LogFieldFormat) IsInt ¶
func (f LogFieldFormat) IsInt() bool
func (LogFieldFormat) IsUint ¶
func (f LogFieldFormat) IsUint() bool
type LogFieldMarshaller ¶
type LogFieldMarshaller interface {
MarshalLogFields(LogObjectWriter)
}
func JoinFields ¶
func JoinFields(a []LogFieldMarshaller, b ...LogFieldMarshaller) []LogFieldMarshaller
type LogFields ¶
func (LogFields) MarshalLogFields ¶
func (v LogFields) MarshalLogFields(w LogObjectWriter)
func (LogFields) MarshalLogObject ¶
func (v LogFields) MarshalLogObject(w LogObjectWriter, _ LogObjectMetricCollector) (string, bool)
type LogObject ¶
type LogObject interface { // should return nil to use default (external) marshaller GetLogObjectMarshaller() LogObjectMarshaller }
Presence of this interface indicates that this object can be used as a log event
type LogObjectFields ¶
type LogObjectFields struct {
Object LogObjectMarshaller
}
func (LogObjectFields) MarshalLogFields ¶
func (v LogObjectFields) MarshalLogFields(w LogObjectWriter)
func (LogObjectFields) MarshalLogObject ¶
func (v LogObjectFields) MarshalLogObject(w LogObjectWriter, c LogObjectMetricCollector) (string, bool)
type LogObjectMarshaller ¶
type LogObjectMarshaller interface {
MarshalLogObject(LogObjectWriter, LogObjectMetricCollector) (msg string, defMsg bool)
}
type LogObjectMetricCollector ¶
type LogObjectMetricCollector interface {
LogObjectMetricCollector()
}
type LogObjectWriter ¶
type LogObjectWriter interface { AddIntField(key string, v int64, fmt LogFieldFormat) AddUintField(key string, v uint64, fmt LogFieldFormat) AddBoolField(key string, v bool, fmt LogFieldFormat) AddFloatField(key string, v float64, fmt LogFieldFormat) AddComplexField(key string, v complex128, fmt LogFieldFormat) AddStrField(key string, v string, fmt LogFieldFormat) AddIntfField(key string, v interface{}, fmt LogFieldFormat) AddTimeField(key string, v time.Time, fmt LogFieldFormat) AddRawJSONField(key string, v interface{}, fmt LogFieldFormat) AddErrorField(msg string, stack throw.StackTrace, severity throw.Severity, hasPanic bool) }
type LogStringer ¶
type LogStringer interface {
LogString() string
}
type MarshallerFactory ¶
type MarshallerFactory interface { CreateErrorMarshaller(error) LogObjectMarshaller CreateLogObjectMarshaller(reflect.Value) LogObjectMarshaller }
func GetMarshallerFactory ¶
func GetMarshallerFactory() MarshallerFactory
type MsgFormatConfig ¶
type MsgFormatConfig struct { Sformat FormatFunc Sformatf FormatfFunc MFactory MarshallerFactory TimeFmt string }
func GetDefaultLogMsgFormatter ¶
func GetDefaultLogMsgFormatter() MsgFormatConfig
func (MsgFormatConfig) FmtLogObject ¶
func (v MsgFormatConfig) FmtLogObject(a ...interface{}) string
func (MsgFormatConfig) FmtLogStruct ¶
func (v MsgFormatConfig) FmtLogStruct(a interface{}) (LogObjectMarshaller, string)
func (MsgFormatConfig) FmtLogStructOrObject ¶
func (v MsgFormatConfig) FmtLogStructOrObject(a interface{}) (LogObjectMarshaller, string)
func (MsgFormatConfig) PrepareMutedLogObject ¶
func (v MsgFormatConfig) PrepareMutedLogObject(a ...interface{}) LogObjectMarshaller
type MsgTemplate ¶
type MsgTemplate struct{}
func (*MsgTemplate) GetLogObjectMarshaller ¶
func (*MsgTemplate) GetLogObjectMarshaller() LogObjectMarshaller
type MutedLogObjectMarshaller ¶
type MutedLogObjectMarshaller interface {
MarshalMutedLogObject(LogObjectMetricCollector)
}
Click to show internal directories.
Click to hide internal directories.