logger

package
v0.0.0-...-ff244ab Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDebugDomain

func AddDebugDomain(domain string) error

AddDebugDomain adds the specified domain to the debug list.

func Clone

func Clone(in *logrus.Logger) *logrus.Logger

Clone clones a logrus.Logger struct.

func Init

func Init(opt Options) error

Init initializes the logger module with the specified options.

func IsDebug

func IsDebug(logger *logrus.Entry) bool

IsDebug returns whether or not the debug mode is activated.

func RemoveDebugDomain

func RemoveDebugDomain(domain string) error

RemoveDebugDomain removes the specified domain from the debug list.

func WithDomain

func WithDomain(domain string) *logrus.Entry

WithDomain returns a logger with the specified domain field.

func WithNamespace

func WithNamespace(nspace string) *logrus.Entry

WithNamespace returns a logger with the specified nspace field.

Types

type Options

type Options struct {
	Syslog bool
	Level  string
	Redis  redis.UniversalClient
}

Options contains the configuration values of the logger system

Jump to

Keyboard shortcuts

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