logging

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Based on https://github.com/hashicorp/terraform-plugin-sdk/blob/3819ed23c0/helper/logging/transport.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDebugOrHigher

func IsDebugOrHigher(logger *log.Logger) bool

func NewLogger

func NewLogger() *log.Logger

NewLogger creates a new logger with default settings.

func NewTransport

func NewTransport(name string, logger *log.Logger, t http.RoundTripper) *transport

Types

type LeveledLogger

type LeveledLogger interface {
	Error(msg string, keysAndValues ...interface{})
	Warn(msg string, keysAndValues ...interface{})
	Info(msg string, keysAndValues ...interface{})
	Debug(msg string, keysAndValues ...interface{})
	IsDebugOrHigher() bool
}

type Logger

type Logger struct {
	Logger *log.Logger
}

func (*Logger) Debug

func (l *Logger) Debug(msg string, keysAndValues ...interface{})

func (*Logger) Error

func (l *Logger) Error(msg string, keysAndValues ...interface{})

func (*Logger) Info

func (l *Logger) Info(msg string, keysAndValues ...interface{})

func (*Logger) Warn

func (l *Logger) Warn(msg string, keysAndValues ...interface{})

Jump to

Keyboard shortcuts

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