logger

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

Close closes the diagnostic logger

func Debug

func Debug(message string, data map[string]interface{})

Debug logs general debug information

func Error

func Error(message string, err error, data map[string]interface{})

Error logs error messages

func FlowError

func FlowError(operation string, err error, data map[string]interface{})

FlowError logs an error in the flow

func FlowStart

func FlowStart(operation string, data map[string]interface{})

FlowStart logs the start of a credential operation

func FlowStep

func FlowStep(step string, data map[string]interface{})

FlowStep logs a step in the credential flow

func FlowSuccess

func FlowSuccess(operation string, data map[string]interface{})

FlowSuccess logs successful completion of a flow

func HashToken

func HashToken(token string) string

HashToken creates a safe representation of a token for logging. Deprecated: Use RedactSecret instead. This function is kept for backward compatibility.

func Info

func Info(message string, data map[string]interface{})

Info logs informational messages

func Initialize

func Initialize()

Initialize sets up the global diagnostic logger based on environment variable

func RedactSecret added in v0.0.7

func RedactSecret(secret string) string

RedactSecret creates a safe redacted representation of a secret for logging. This is NOT for cryptographic purposes - it's only for log identification. It shows the type of secret detected and length, without exposing the actual value.

func RedactToken added in v0.0.7

func RedactToken(token string) string

RedactToken is an alias for RedactSecret for backward compatibility. Deprecated: Use RedactSecret instead.

func SanitizeConfig

func SanitizeConfig(data map[string]interface{}) map[string]interface{}

SanitizeConfig removes sensitive fields from config data

func SanitizeURL

func SanitizeURL(url string) string

SanitizeURL removes sensitive parts from URLs for logging

Types

type DiagnosticLogger

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

DiagnosticLogger provides conditional logging for debugging git credential flows

Jump to

Keyboard shortcuts

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