log

package
v0.0.0-...-e249936 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(c *Config) error

Init initialize logrus to your weapon of choice

Types

type Config

type Config struct {
	Level        string `json:"level" yaml:"level"`                 // Log level
	Path         string `json:"path" yaml:"path"`                   // Log path
	Filename     string `json:"filename" yaml:"filename"`           // Log filename
	MaxAge       int    `json:"max_age" yaml:"max_age"`             // Log store time
	RotationTime int    `json:"rotation_time" yaml:"rotation_time"` // Log rotation time
	ReportCaller bool   `json:"report_caller" yaml:"report_caller"` // Report caller func and line number
	LogrusLevel  logrus.Level
}

Config for log config

func (*Config) Check

func (c *Config) Check() error

Check validates config

Jump to

Keyboard shortcuts

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