logging

package
v6.0.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

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

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

EscapeNewlineWriter represents a io.Writer that can escape newlines

func NewEscapeNewlineWriter

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

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

type UnescapeNewlineWriter

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

UnescapeNewlineWriter represents a io.Writer that can unescape newlines

func NewUnescapeNewlineWriter

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

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