log

package
v0.0.47 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHooks

func AddHooks(hooks ...hook.Hook) error

AddHook for adding a hook

func AuditLog

func AuditLog(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

func With

func With(opts ...Option)

With should be used if you want to customize you logger

func WithFields

func WithFields(ctx context.Context, fields ...interface{}) *logrus.Entry

Types

type Option

type Option struct {
	// DisableReportCaller will remove the report caller info if true
	DisableReportCaller bool
	// Formatter will format the log message as output
	Formatter logrus.Formatter
	// Outer defines where the log info outputs
	Outer io.Writer
	// Hooks 钩子回调
	Hooks []hook.Hook
	// Environment the env string
	Environment string
	StackSkip   int
}

Option defines a set of options

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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