logging

package
v0.0.0-...-b0d25e1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Defaults = &Config{
	DefaultLevel:  "info",
	PackageLevel:  map[string]string{},
	Format:        "text",
	EnableConsole: true,
	EnableSyslog:  false,
	SyslogURL:     "",
}

Functions

func GetAvailableLevelNames

func GetAvailableLevelNames() []string

func GetLogger

func GetLogger(name string) *logrus.Logger

Initialize package level logger. This function should only be called in package initialization

func SetLevel

func SetLevel(level logrus.Level)

func Setup

func Setup() error

Types

type Config

type Config struct {
	DefaultLevel  string            `yaml:"defaultLevel"`
	PackageLevel  map[string]string `yaml:"packageLevel"`
	Format        string
	EnableConsole bool   `yaml:"enableConsole"`
	EnableSyslog  bool   `yaml:"enableSyslog"`
	SyslogURL     string `yaml:"syslogURL"`
}

Jump to

Keyboard shortcuts

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