Documentation ¶
Index ¶
- Constants
- func DefaultLogMapper(ctx context.Context, msg *log.LogMessage) map[string]any
- func GetLogObjectType(logObj []any) string
- func GetObjectType(obj any) string
- func ParseLogObject(logObj []any, indent bool) string
- func ParseObject(fullMessage any, indent bool) string
- type ConsoleWriter
- type Endpoint
- type GraylogConfig
- type GraylogWriter
- type JSONLConsoleWriter
- type LogMapper
- type SyslogWriter
- type Transport
Constants ¶
View Source
const ParseErrorMsg = "******************ERROR DURING MARSHAL OF FULL MESSAGE*******************"
View Source
const TimeFormat = "2006-01-02T15:04:05.000Z07:00"
Variables ¶
This section is empty.
Functions ¶
func DefaultLogMapper ¶
func GetLogObjectType ¶
func GetObjectType ¶
func ParseLogObject ¶
func ParseObject ¶
Types ¶
type ConsoleWriter ¶
type ConsoleWriter struct { }
func NewConsoleWriter ¶
func NewConsoleWriter() *ConsoleWriter
func (*ConsoleWriter) GetBufferSize ¶
func (c *ConsoleWriter) GetBufferSize() int
func (*ConsoleWriter) Start ¶
func (c *ConsoleWriter) Start(logChannel chan log.MuxLogMessage)
func (*ConsoleWriter) WriteMessage ¶
func (c *ConsoleWriter) WriteMessage(ctx context.Context, l *log.LogMessage) error
type GraylogConfig ¶
type GraylogWriter ¶
type GraylogWriter struct {
// contains filtered or unexported fields
}
GraylogWriter represents an established graylog connection
func NewGraylogTCP ¶
func NewGraylogTCP(errorLog log.LogWriter, c GraylogConfig) (*GraylogWriter, error)
func NewGraylogUDP ¶
func NewGraylogUDP(errorLog log.LogWriter, c GraylogConfig) (*GraylogWriter, error)
func (*GraylogWriter) GetBufferSize ¶
func (g *GraylogWriter) GetBufferSize() int
func (*GraylogWriter) Start ¶
func (g *GraylogWriter) Start(logChannel chan log.MuxLogMessage)
func (*GraylogWriter) WriteMessage ¶
func (g *GraylogWriter) WriteMessage(ctx context.Context, msg *log.LogMessage) (err error)
type JSONLConsoleWriter ¶
type JSONLConsoleWriter struct {
// contains filtered or unexported fields
}
func NewJSONLConsoleWriter ¶
func NewJSONLConsoleWriter(mapper LogMapper) *JSONLConsoleWriter
func (*JSONLConsoleWriter) WriteMessage ¶
func (c *JSONLConsoleWriter) WriteMessage(ctx context.Context, l *log.LogMessage) error
type SyslogWriter ¶
type SyslogWriter struct {
// contains filtered or unexported fields
}
func NewSyslogWriterWriter ¶
func NewSyslogWriterWriter(ctx context.Context, syslogTag, prefix string) *SyslogWriter
func (*SyslogWriter) GetBufferSize ¶
func (s *SyslogWriter) GetBufferSize() int
func (*SyslogWriter) Start ¶
func (c *SyslogWriter) Start(logChannel chan log.MuxLogMessage)
func (*SyslogWriter) WriteMessage ¶
func (c *SyslogWriter) WriteMessage(ctx context.Context, l *log.LogMessage) error
Click to show internal directories.
Click to hide internal directories.