log

package
v11.4.0-rc1+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2018 License: MIT Imports: 12 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(svc service.Service)

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 ServiceLogHook

type ServiceLogHook struct {
	service.Logger
	Level logrus.Level
}

func (*ServiceLogHook) Fire

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

func (*ServiceLogHook) Levels

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

Jump to

Keyboard shortcuts

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