logger

package
v0.1.17 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultLoggerFactory

type DefaultLoggerFactory struct {
	Filename     string
	MaxSizeMB    int
	MaxAgeDays   int
	MaxBackups   int
	Compress     bool
	LogToConsole bool
	// contains filtered or unexported fields
}

func GetLogFactory

func GetLogFactory(
	filename string,
	maxSizeMB int,
	maxAgeDays int,
	maxBackups int,
	compress bool,
	logToConsole bool,
) (*DefaultLoggerFactory, error)

func (*DefaultLoggerFactory) GetLogger

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

type LogrusHook

type LogrusHook struct {
	Hostname string
	Context  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