logger

package
v0.42.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package logger contains implementations for the syft.logger.Logger interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogrusConfig

type LogrusConfig struct {
	EnableConsole bool
	EnableFile    bool
	Structured    bool
	Level         logrus.Level
	FileLocation  string
}

LogrusConfig contains all configurable values for the Logrus logger

type LogrusLogger

type LogrusLogger struct {
	Config LogrusConfig
	Logger *logrus.Logger
	Output io.Writer
}

LogrusLogger contains all runtime values for using Logrus with the configured output target and input configuration values.

func NewLogrusLogger

func NewLogrusLogger(cfg LogrusConfig) *LogrusLogger

NewLogrusLogger creates a new LogrusLogger with the given configuration

func (*LogrusLogger) Debug

func (l *LogrusLogger) Debug(args ...interface{})

Debug logs the given arguments at the debug logging level.

func (*LogrusLogger) Debugf

func (l *LogrusLogger) Debugf(format string, args ...interface{})

Debugf takes a formatted template string and template arguments for the debug logging level.

func (*LogrusLogger) Error added in v0.7.0

func (l *LogrusLogger) Error(args ...interface{})

Error logs the given arguments at the error logging level.

func (*LogrusLogger) Errorf

func (l *LogrusLogger) Errorf(format string, args ...interface{})

Errorf takes a formatted template string and template arguments for the error logging level.

func (*LogrusLogger) Info

func (l *LogrusLogger) Info(args ...interface{})

Info logs the given arguments at the info logging level.

func (*LogrusLogger) Infof

func (l *LogrusLogger) Infof(format string, args ...interface{})

Infof takes a formatted template string and template arguments for the info logging level.

func (*LogrusLogger) Warn added in v0.7.0

func (l *LogrusLogger) Warn(args ...interface{})

Warn logs the given arguments at the warning logging level.

func (*LogrusLogger) Warnf added in v0.7.0

func (l *LogrusLogger) Warnf(format string, args ...interface{})

Warnf takes a formatted template string and template arguments for the warning logging level.

type LogrusNestedLogger

type LogrusNestedLogger struct {
	Logger *logrus.Entry
}

LogrusNestedLogger is a wrapper for Logrus to enable nested logging configuration (loggers that always attach key-value pairs to all log entries)

func (*LogrusNestedLogger) Debug

func (l *LogrusNestedLogger) Debug(args ...interface{})

Debug logs the given arguments at the debug logging level.

func (*LogrusNestedLogger) Debugf

func (l *LogrusNestedLogger) Debugf(format string, args ...interface{})

Debugf takes a formatted template string and template arguments for the debug logging level.

func (*LogrusNestedLogger) Error added in v0.7.0

func (l *LogrusNestedLogger) Error(args ...interface{})

Error logs the given arguments at the error logging level.

func (*LogrusNestedLogger) Errorf

func (l *LogrusNestedLogger) Errorf(format string, args ...interface{})

Errorf takes a formatted template string and template arguments for the error logging level.

func (*LogrusNestedLogger) Info

func (l *LogrusNestedLogger) Info(args ...interface{})

Info logs the given arguments at the info logging level.

func (*LogrusNestedLogger) Infof

func (l *LogrusNestedLogger) Infof(format string, args ...interface{})

Infof takes a formatted template string and template arguments for the info logging level.

func (*LogrusNestedLogger) Warn added in v0.7.0

func (l *LogrusNestedLogger) Warn(args ...interface{})

Warn logs the given arguments at the warning logging level.

func (*LogrusNestedLogger) Warnf added in v0.7.0

func (l *LogrusNestedLogger) Warnf(format string, args ...interface{})

Warnf takes a formatted template string and template arguments for the warning logging level.

Jump to

Keyboard shortcuts

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