logging

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() ocmlogging.Logger

New creates the provider.

Types

type TfLogger

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

TfLogger is a logger that uses the Go `log` package.

func (*TfLogger) Debug

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

Debug sends to the log a debug message formatted using the fmt.Sprintf function and the given format and arguments.

func (*TfLogger) DebugEnabled

func (l *TfLogger) DebugEnabled() bool

DebugEnabled returns true iff the debug level is enabled.

func (*TfLogger) Error

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

Error sends to the log an error message formatted using the fmt.Sprintf function and the given format and arguments.

func (*TfLogger) ErrorEnabled

func (l *TfLogger) ErrorEnabled() bool

ErrorEnabled returns true iff the error level is enabled.

func (*TfLogger) Fatal

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

Fatal sends to the log an error message formatted using the fmt.Sprintf function and the given format and arguments. After that it will os.Exit(1) This level is always enabled

func (*TfLogger) Info

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

Info sends to the log an information message formatted using the fmt.Sprintf function and the given format and arguments.

func (*TfLogger) InfoEnabled

func (l *TfLogger) InfoEnabled() bool

InfoEnabled returns true iff the information level is enabled.

func (*TfLogger) Warn

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

Warn sends to the log a warning message formatted using the fmt.Sprintf function and the given format and arguments.

func (*TfLogger) WarnEnabled

func (l *TfLogger) WarnEnabled() bool

WarnEnabled returns true iff the warning level is enabled.

Jump to

Keyboard shortcuts

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