logging

package
v0.27.6 Latest Latest
Warning

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

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

Documentation

Overview

Package logging provides various logging helpers for ARC

Index

Constants

View Source
const (
	LogLevelDebug = "debug"
	LogLevelInfo  = "info"
	LogLevelWarn  = "warn"
	LogLevelError = "error"
	LogFormatText = "text"
	LogFormatJSON = "json"
)

Variables

View Source
var (
	LogOpts = zap.Options{
		TimeEncoder: zapcore.TimeEncoderOfLayout(time.RFC3339),
		Development: true,
		EncoderConfigOptions: []zap.EncoderConfigOption{
			func(ec *zapcore.EncoderConfig) {
				ec.LevelKey = "severity"
				ec.MessageKey = "message"
			},
		},
	}
)

Functions

func NewLogger

func NewLogger(logLevel string, logFormat string) (logr.Logger, error)

Types

type Transport

type Transport struct {
	Transport http.RoundTripper

	Log *logr.Logger
}

Transport wraps a transport with metrics monitoring

func (Transport) RoundTrip

func (t Transport) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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