logger

package
v5.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package logger contains types and functions related to logging in terraform provider

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	log.Logger
	// contains filtered or unexported fields
}

Logger is a wrapper over log.Logger and hclog.Logger

func FromContext

func FromContext(ctx context.Context, args ...interface{}) *Logger

FromContext returns the logger from the context

func FromHCLog

func FromHCLog(hclog hclog.Logger) *Logger

FromHCLog returns a new Logger from a hclog.Logger

func Get

func Get(args ...interface{}) *Logger

Get returns a global log object, there is no context like operation id

func (*Logger) HCLog

func (l *Logger) HCLog() hclog.Logger

HCLog returns Logger's hclog

func (*Logger) HandleLog

func (l *Logger) HandleLog(e *log.Entry) error

HandleLog implements the logic for handling log events

Jump to

Keyboard shortcuts

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