Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFileHook ¶ added in v1.2.2
func NewFileHook(options logrus_mate.Options) (hook logrus.Hook, err error)
NewLogstashHook hook configuration
func NewLogstashHook ¶
func NewLogstashHook(options logrus_mate.Options) (hook logrus.Hook, err error)
NewLogstashHook hook configuration
Types ¶
type FileHookConfig ¶ added in v1.2.2
type FileHookConfig struct { FilePath string `json:"file_path"` //"/var/log/misc.log" MaxSize int `json:"maxsize"` MaxBackups int `json:"maxbackups"` MaxAge int `json:"maxage"` }
LogstashHookConfig configuration struct
type LogstashHookConfig ¶
type LogstashHookConfig struct { AppName string `json:"app_name"` Protocol string `json:"protocol"` Address string `json:"address"` AlwaysSentFields logrus.Fields `json:"always_sent_fields"` Prefix string `json:"prefix"` }
LogstashHookConfig configuration struct
type LumberjackHook ¶ added in v1.2.2
type LumberjackHook struct {
// contains filtered or unexported fields
}
LumberjackHook stores the configuration of the hook
func NewLumberjackHook ¶ added in v1.2.2
func NewLumberjackHook(logger *lumberjack.Logger) (*LumberjackHook, error)
NewLumberjackHook creates a new LumberjackHook
func (*LumberjackHook) Fire ¶ added in v1.2.2
func (hook *LumberjackHook) Fire(entry *logrus.Entry) error
Fire is called when a log event is fired.
func (*LumberjackHook) Levels ¶ added in v1.2.2
func (hook *LumberjackHook) Levels() []logrus.Level
Levels returns the available logging levels
Click to show internal directories.
Click to hide internal directories.