Versions in this module Expand all Collapse all v0 v0.54.1 Mar 29, 2024 v0.54.0 Mar 28, 2024 v0.53.1 Mar 26, 2024 v0.53.0 Sep 4, 2023 v0.52.0 Sep 26, 2022 v0.50.0 Dec 14, 2021 Changes in this version + const ChunkSize + var BufSize uint = 16384 + func DropPolicy(msg *Message, ch chan *Message) + type CompressType int + const CompressGzip + const CompressZlib + type Config struct + Addr string + Facility string + Hostname string + Merge func(...map[string]interface{}) map[string]interface{} + Protocol string + TLSConfig *tls.Config + ThrottlePolicy *ThrottlePolicyConfig + type DefaultThrottlePolicy struct + func (d *DefaultThrottlePolicy) Flush() + func (d *DefaultThrottlePolicy) HandleTrailingMessage(m Message) + func (d *DefaultThrottlePolicy) Init(hook *Hook) + func (d *DefaultThrottlePolicy) PendingTrailingMessages() bool + type FireMessageFunc func(msg Message) error + type Hook struct + Extra map[string]interface{} + Facility string + Hostname string + Pid int + Threshold logrus.Level + func NewHook(ctx context.Context, cfg *Config, extra map[string]interface{}) (*Hook, error) + func (hook *Hook) Fire(entry *logrus.Entry) error + func (hook *Hook) FireMessage(msg Message) error + func (hook *Hook) Flush() + func (hook *Hook) IsThrottled() bool + func (hook *Hook) Levels() []logrus.Level + func (hook *Hook) Stop() + type MergeFields func(...map[string]interface{}) map[string]interface + type Message struct + Extra map[string]interface{} + Facility string + File string + Full string + Host string + Level int32 + Line int + Pid int + Prefix string + Short string + Time float64 + Version string + func (m *Message) MarshalJSON() ([]byte, error) + func (m *Message) UnmarshalJSON(data []byte) error + type Priority int + const LOG_ALERT + const LOG_CRIT + const LOG_DEBUG + const LOG_EMERG + const LOG_ERR + const LOG_INFO + const LOG_NOTICE + const LOG_WARNING + type Reader struct + func (r *Reader) Addr() string + func (r *Reader) Close() error + func (r *Reader) Read(p []byte) (int, error) + func (r *Reader) ReadMessage() (*Message, error) + type Stack struct + func NewStack(cap int) *Stack + func (q *Stack) Empty() bool + func (q *Stack) Pop() (Message, bool) + func (q *Stack) Push(n Message) + func (q *Stack) Ready() bool + type TCPWriter struct + Facility string + Hostname string + func NewTCPWriter(addr string, tlsCfg *tls.Config) (*TCPWriter, error) + func (w *TCPWriter) Write(p []byte) (int, error) + func (w *TCPWriter) WriteMessage(m *Message) error + type ThrottlePolicy interface + Flush func() + HandleTrailingMessage func(m Message) + Init func(hook *Hook) + PendingTrailingMessages func() bool + func NewDefaultThrottlePolicy() ThrottlePolicy + type ThrottlePolicyConfig struct + Amount int + Period time.Duration + Policy ThrottlePolicy + type UDPWriter struct + CompressionLevel int + CompressionType CompressType + Facility string + func NewUDPWriter(addr string) (*UDPWriter, error) + func (w *UDPWriter) Write(p []byte) (n int, err error) + func (w *UDPWriter) WriteMessage(m *Message) (err error) + type Writer interface + WriteMessage func(*Message) error