logging

package
v6.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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