log

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: LGPL-3.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize(opts ...Option) error

Initialize initializes a logger instance with given level, filepath, filename, maxSize, maxAge and rotationTime.

func New

func New() *logrus.Logger

func NewWithModule

func NewWithModule(name string) *logrus.Entry

func ParseLevel

func ParseLevel(level string) logrus.Level

Types

type Option

type Option func(*config)

func WithFileName

func WithFileName(fileName string) Option

func WithFilePath

func WithFilePath(filePath string) Option

func WithMaxAge

func WithMaxAge(maxAge time.Duration) Option

func WithMaxSize

func WithMaxSize(maxSize int64) Option

func WithPersist

func WithPersist(persist bool) Option

func WithReportCaller

func WithReportCaller(reportCaller bool) Option

func WithRotationTime

func WithRotationTime(rotationTime time.Duration) Option

Jump to

Keyboard shortcuts

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