logrusx

package
v0.0.573 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: Apache-2.0 Imports: 20 Imported by: 67

Documentation

Index

Constants

View Source
const ConfigSchemaID = "ory://logging-config"

Variables

View Source
var ConfigSchema string

Functions

func AddConfigSchema added in v0.0.276

func AddConfigSchema(c interface {
	AddResource(url string, r io.Reader) error
}) error

AddConfigSchema adds the logging schema to the compiler. The interface is specified instead of `jsonschema.Compiler` to allow the use of any jsonschema library fork or version.

Types

type Logger added in v0.0.125

type Logger struct {
	*logrus.Entry
	// contains filtered or unexported fields
}

func New

func New(name string, version string, opts ...Option) *Logger

New creates a new logger with all the important fields set.

func NewAudit added in v0.0.125

func NewAudit(name string, version string, opts ...Option) *Logger

func (*Logger) Debugf added in v0.0.354

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

func (*Logger) Errorf added in v0.0.354

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

func (*Logger) Fatalf added in v0.0.354

func (l *Logger) Fatalf(format string, args ...interface{})

func (*Logger) HTTPHeadersRedacted added in v0.0.268

func (l *Logger) HTTPHeadersRedacted(h http.Header) map[string]interface{}

func (*Logger) Infof added in v0.0.354

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

func (*Logger) LeakSensitiveData added in v0.0.138

func (l *Logger) LeakSensitiveData() bool

func (*Logger) Logf added in v0.0.354

func (l *Logger) Logf(level logrus.Level, format string, args ...interface{})

func (*Logger) Logrus added in v0.0.125

func (l *Logger) Logrus() *logrus.Logger

func (*Logger) NewEntry added in v0.0.126

func (l *Logger) NewEntry() *Logger

func (*Logger) Panicf added in v0.0.354

func (l *Logger) Panicf(format string, args ...interface{})

func (*Logger) PopLogger added in v0.0.171

func (l *Logger) PopLogger(lvl logging.Level, s string, args ...interface{})

func (*Logger) Printf added in v0.0.354

func (l *Logger) Printf(format string, args ...interface{})

func (*Logger) ReportError added in v0.0.356

func (l *Logger) ReportError(r *http.Request, code int, err error, args ...interface{})

func (*Logger) Tracef added in v0.0.354

func (l *Logger) Tracef(format string, args ...interface{})

func (*Logger) UseConfig added in v0.0.166

func (l *Logger) UseConfig(c configurator)

func (*Logger) Warnf added in v0.0.354

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

func (*Logger) Warningf added in v0.0.354

func (l *Logger) Warningf(format string, args ...interface{})

func (*Logger) WithContext added in v0.0.126

func (l *Logger) WithContext(ctx context.Context) *Logger

func (*Logger) WithError added in v0.0.125

func (l *Logger) WithError(err error) *Logger

func (*Logger) WithField added in v0.0.125

func (l *Logger) WithField(key string, value interface{}) *Logger

func (*Logger) WithFields added in v0.0.125

func (l *Logger) WithFields(f logrus.Fields) *Logger

func (*Logger) WithRequest added in v0.0.125

func (l *Logger) WithRequest(r *http.Request) *Logger

func (*Logger) WithSensitiveField added in v0.0.125

func (l *Logger) WithSensitiveField(key string, value interface{}) *Logger

type Option added in v0.0.125

type Option func(*options)

func ForceFormat added in v0.0.125

func ForceFormat(format string) Option

func ForceFormatter added in v0.0.125

func ForceFormatter(formatter logrus.Formatter) Option

func ForceLevel added in v0.0.125

func ForceLevel(level logrus.Level) Option

func LeakSensitive added in v0.0.125

func LeakSensitive() Option

func RedactionText added in v0.0.358

func RedactionText(text string) Option

func ReportCaller added in v0.0.125

func ReportCaller(reportCaller bool) Option

func UseLogger added in v0.0.125

func UseLogger(l *logrus.Logger) Option

func WithConfigurator added in v0.0.166

func WithConfigurator(c configurator) Option

func WithExitFunc added in v0.0.125

func WithExitFunc(exitFunc func(int)) Option

func WithHook added in v0.0.127

func WithHook(hook logrus.Hook) Option

Jump to

Keyboard shortcuts

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