log

package
v1.15.16 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: GPL-3.0 Imports: 7 Imported by: 48

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// RootLoggerName - Root logger name, contains all log data
	RootLoggerName = "root"
	// RootLogger - Root Logger
	RootLogger = rootLogger()
)
View Source
var (
	// AuditLogger - Single audit log
	AuditLogger = newAuditLogger()
)

Functions

func GetLogDir

func GetLogDir() string

GetLogDir - Return the log dir

func GetRootAppDir

func GetRootAppDir() string

GetRootAppDir - Get the Sliver app dir, default is: ~/.sliver/

func LevelFrom added in v1.5.0

func LevelFrom(level int) logrus.Level

LevelFrom - returns level from int

func NamedLogger

func NamedLogger(pkg, stream string) *logrus.Entry

NamedLogger - Returns a logger wrapped with pkg/stream fields

Types

type TxtHook

type TxtHook struct {
	Name string
	// contains filtered or unexported fields
}

TxtHook - Hook in a textual version of the logs

func NewTxtHook

func NewTxtHook(name string) *TxtHook

NewTxtHook - returns a new txt hook

func (*TxtHook) Fire

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

Fire - Implements the fire method of the Logrus hook

func (*TxtHook) Levels

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

Levels - Hook all levels

Jump to

Keyboard shortcuts

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