logging

package
v5.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 10 Imported by: 8

Documentation

Overview

Package logging contains functions to create the plugin hclog.Logger

Index

Constants

View Source
const (
	EnvLogLevel = "STEAMPIPE_LOG_LEVEL"
	EnvProfile  = "STEAMPIPE_PROFILE"
)

Variables

View Source
var LegacyLogLevelEnvVars = []string{"SP_LOG", "STEAMPIPE_LOG"}

Functions

func ClearProfileData

func ClearProfileData()

func DisplayProfileData

func DisplayProfileData(minTime time.Duration)

func LogLevel

func LogLevel() string

func LogTime

func LogTime(operation string)

func NewLogger

func NewLogger(options *hclog.LoggerOptions) hclog.Logger

NewLogger creates a hclog logger with the level specified by the SP_LOG env var

Types

type EscapeNewlineWriter added in v5.6.0

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

EscapeNewlineWriter represents a io.Writer that can escape newlines

func NewEscapeNewlineWriter added in v5.6.0

func NewEscapeNewlineWriter(writer io.Writer) EscapeNewlineWriter

NewEscapeNewlineWriter returns an object that conform to the io.Writer interface and can be used to escape newline ('\n') with the string literal ("\n") The param is the underlying io.Writer that this object will write to

func (EscapeNewlineWriter) Write added in v5.6.0

func (m EscapeNewlineWriter) Write(in []byte) (n int, err error)

type UnescapeNewlineWriter added in v5.6.0

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

UnescapeNewlineWriter represents a io.Writer that can unescape newlines

func NewUnescapeNewlineWriter added in v5.6.0

func NewUnescapeNewlineWriter(writer io.Writer) UnescapeNewlineWriter

NewEscapeNewlineWriter returns an object that conform to the io.Writer interface and can be used to unescape newline string literal ("\n") with the newline byte ('\n') The param is the underlying io.Writer that this object will write to

func (UnescapeNewlineWriter) Write added in v5.6.0

func (m UnescapeNewlineWriter) Write(in []byte) (n int, err error)

Jump to

Keyboard shortcuts

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