logger

package
v0.1.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New added in v0.1.18

func New(
	filename string,
	maxSizeMB int,
	maxAgeDays int,
	maxBackups int,
	compress bool,
	logToConsole bool,
	level logrus.Level,
	customLevels map[string]logrus.Level,
) (definitions.LoggerFactory, error)

Types

type DefaultLoggerFactory

type DefaultLoggerFactory struct {
	Filename     string
	MaxSizeMB    int
	MaxAgeDays   int
	MaxBackups   int
	Compress     bool
	LogToConsole bool
	Level        logrus.Level
	CustomLevels map[string]logrus.Level
	// contains filtered or unexported fields
}

func (*DefaultLoggerFactory) GetLogger

func (d *DefaultLoggerFactory) GetLogger(loggerType string, name string) *logrus.Logger

type LogrusHook

type LogrusHook struct {
	Hostname string
	Context  string
	Type     string
}

func (*LogrusHook) Fire

func (hook *LogrusHook) Fire(entry *logrus.Entry) error

func (*LogrusHook) Levels

func (hook *LogrusHook) Levels() []logrus.Level

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL