logging

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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