logging

package
v1.2.48 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogger

func NewLogger() (result *logrus.Logger)

NewLogger creates a new logger with the default config for the project

Types

type AWSLogger

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

AWSLogger is an implementation of the OCM logger interface that uses the logging framework of the project. Don't create instances of this type directly; use the NewAWSLogger function instead.

func (*AWSLogger) Log

func (l *AWSLogger) Log(args ...interface{})

type AWSLoggerBuilder

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

AWSLoggerBuilder contains the information and logic needed to create an AWS logger that uses the logging framework of the project. Don't create instances of this type directly; use the NewAWSLogger function instead.

func (*AWSLoggerBuilder) Build

func (b *AWSLoggerBuilder) Build() (result *AWSLogger, err error)

Build uses the information stored in the builder to create a new OCM logger that uses the logging framework of the project.

func (*AWSLoggerBuilder) Logger

func (b *AWSLoggerBuilder) Logger(value *logrus.Logger) *AWSLoggerBuilder

Logger sets the underlying logger that will be used by the OCM logger to send the messages to the log.

type OCMLogger

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

OCMLogger is an implementation of the OCM logger interface that uses the logging framework of the project. Don't create instances of this type directly; use the NewOCMLogger function instead.

func (*OCMLogger) Debug

func (l *OCMLogger) Debug(ctx context.Context, format string, args ...interface{})

func (*OCMLogger) DebugEnabled

func (l *OCMLogger) DebugEnabled() bool

func (*OCMLogger) Error

func (l *OCMLogger) Error(ctx context.Context, format string, args ...interface{})

func (*OCMLogger) ErrorEnabled

func (l *OCMLogger) ErrorEnabled() bool

func (*OCMLogger) Fatal added in v1.0.6

func (l *OCMLogger) Fatal(ctx context.Context, format string, args ...interface{})

func (*OCMLogger) Info

func (l *OCMLogger) Info(ctx context.Context, format string, args ...interface{})

func (*OCMLogger) InfoEnabled

func (l *OCMLogger) InfoEnabled() bool

func (*OCMLogger) Warn

func (l *OCMLogger) Warn(ctx context.Context, format string, args ...interface{})

func (*OCMLogger) WarnEnabled

func (l *OCMLogger) WarnEnabled() bool

type OCMLoggerBuilder

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

OCMLoggerBuilder contains the information and logic needed to create an OCM logger that uses the logging framework of the project. Don't create instances of this type directly; use the NewOCMLogger function instead.

func NewOCMLogger

func NewOCMLogger() *OCMLoggerBuilder

NewOCMLogger creates new builder that can then be used to configure and build an OCM logger that uses the logging framework of the project.

func (*OCMLoggerBuilder) Build

func (b *OCMLoggerBuilder) Build() (result *OCMLogger, err error)

Build uses the information stored in the builder to create a new OCM logger that uses the logging framework of the project.

func (*OCMLoggerBuilder) Logger

func (b *OCMLoggerBuilder) Logger(value *logrus.Logger) *OCMLoggerBuilder

Logger sets the underlying logger that will be used by the OCM logger to send the messages to the log.

type RoundTripper

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

RoundTripper is a round tripper that dumps the details of the requests and the responses to the log. Don't create instances of this type directly; use the NewRoundTripper function instead.

func (*RoundTripper) RoundTrip

func (d *RoundTripper) RoundTrip(request *http.Request) (response *http.Response, err error)

RoundTrip is he implementation of the http.RoundTripper interface.

type RoundTripperBuilder

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

RoundTripperBuilder contains the information an logic needed to build a new round tripper that sends to the log the details of the requests sent and the responses received. Don't create instances of this type directly; use the NewRoundTripper function instead.

func NewRoundTripper

func NewRoundTripper() *RoundTripperBuilder

NewRoundTripper creates a builder that can then be used to create a round tripper that sends to the log the details of the requests sent and the responses received.

func (*RoundTripperBuilder) Build

func (b *RoundTripperBuilder) Build() (result *RoundTripper, err error)

Build uses the information stored in the builder to create a new round tripper that sends to the log the details of the requests sent and the responses received.

func (*RoundTripperBuilder) Logger

Logger sets the logger that the round tripper will use to send the details of request and responses to the log. This is mandatory.

func (*RoundTripperBuilder) Next

Next sets the next round tripper. The details of the request will be sent to the log before calling it, and the details of the response will be sent to the log after calling it.

func (*RoundTripperBuilder) Redact

Redact specifies a field whose value should be removed from the messages sent to the log.

Jump to

Keyboard shortcuts

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