logging

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package logging provides helpers regarding logging.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientLogger

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

func (*ClientLogger) Append

func (c *ClientLogger) Append(l ...logs.Loggers) error

func (*ClientLogger) AppendLogger

func (c *ClientLogger) AppendLogger(l ...logr.Logger) error

func (*ClientLogger) Check

func (c *ClientLogger) Check() error

func (*ClientLogger) Close

func (c *ClientLogger) Close() error

func (*ClientLogger) Log

func (c *ClientLogger) Log(output ...interface{})

func (*ClientLogger) LogError

func (c *ClientLogger) LogError(err ...interface{})

func (*ClientLogger) LogErrorAndMessage

func (c *ClientLogger) LogErrorAndMessage(err error, format string, args ...interface{})

func (*ClientLogger) LogErrorMessage

func (c *ClientLogger) LogErrorMessage(format string, args ...interface{})

func (*ClientLogger) LogInfo

func (c *ClientLogger) LogInfo(format string, args ...interface{})

func (*ClientLogger) LogRawError

func (c *ClientLogger) LogRawError(err error)

func (*ClientLogger) LogResource

func (c *ClientLogger) LogResource(r resource.IResource)

func (*ClientLogger) SetLogSource

func (c *ClientLogger) SetLogSource(source string) error

func (*ClientLogger) SetLoggerSource

func (c *ClientLogger) SetLoggerSource(source string) error

type ILogger

type ILogger interface {
	logs.IMultipleLoggers
	// LogRawError logs an error.
	LogRawError(err error)
	LogErrorAndMessage(err error, format string, args ...interface{})
	LogErrorMessage(format string, args ...interface{})
	LogInfo(format string, args ...interface{})
	// LogResource logs the description of an API resource
	LogResource(r resource.IResource)
}

ILogger defines a generic Client logger.

func NewClientLogger

func NewClientLogger(loggerSource string, defaultLoggers ...logs.Loggers) (l ILogger, err error)

NewClientLogger returns a logger for use in clients. if no default loggers are provided, the logger will be set to print to the standard output.

func NewStandardClientLogger

func NewStandardClientLogger(loggerSource string, logFilePath *string) (l ILogger, err error)

NewStandardClientLogger returns a typical client logger with logs written to a file if the logFilePath is set.

Jump to

Keyboard shortcuts

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