log

package
v12.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FormatRunner = "runner"
	FormatText   = "text"
	FormatJSON   = "json"
)

Variables

This section is empty.

Functions

func AddSecretsCleanupLogHook

func AddSecretsCleanupLogHook(logger *logrus.Logger)

func ConfigureLogging

func ConfigureLogging(app *cli.App)

func SetRunnerFormatter

func SetRunnerFormatter()

func SetSystemLogger

func SetSystemLogger(logrusLogger *logrus.Logger, svc systemService)

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

func Configuration

func Configuration() *Config

func NewConfig

func NewConfig(logger *logrus.Logger) *Config

func (*Config) IsFormatSetWithCli

func (l *Config) IsFormatSetWithCli() bool

func (*Config) IsLevelSetWithCli

func (l *Config) IsLevelSetWithCli() bool

func (*Config) ReloadConfiguration

func (l *Config) ReloadConfiguration()

func (*Config) SetFormat

func (l *Config) SetFormat(format string) error

func (*Config) SetLevel

func (l *Config) SetLevel(levelString string) error

type RunnerTextFormatter

type RunnerTextFormatter struct {
	// Force disabling colors.
	DisableColors bool

	// The fields are sorted by default for a consistent output. For applications
	// that log extremely frequently and don't use the JSON formatter this may not
	// be desired.
	DisableSorting bool
}

func (*RunnerTextFormatter) Format

func (f *RunnerTextFormatter) Format(entry *logrus.Entry) ([]byte, error)

type SecretsCleanupHook

type SecretsCleanupHook struct{}

func (*SecretsCleanupHook) Fire

func (s *SecretsCleanupHook) Fire(entry *logrus.Entry) error

func (*SecretsCleanupHook) Levels

func (s *SecretsCleanupHook) Levels() []logrus.Level

type SystemServiceLogHook

type SystemServiceLogHook struct {
	Level logrus.Level
	// contains filtered or unexported fields
}

func (*SystemServiceLogHook) Fire

func (s *SystemServiceLogHook) Fire(entry *logrus.Entry) error

func (*SystemServiceLogHook) Levels

func (s *SystemServiceLogHook) Levels() []logrus.Level

Jump to

Keyboard shortcuts

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