logging

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package logging provides real-time log output derived from session events. The session JSON is THE forensic record. This package provides optional real-time console output for monitoring, derived from session events.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fields

type Fields = map[string]interface{}

Fields is a map of structured log fields. Type alias provides semantic clarity over raw map[string]interface{}.

type Level

type Level string

Level represents log severity.

const (
	LevelDebug Level = "DEBUG"
	LevelInfo  Level = "INFO"
	LevelWarn  Level = "WARN"
	LevelError Level = "ERROR"
)

type Logger

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

Logger provides structured logging to stdout. This is for real-time monitoring only - forensic analysis uses session JSON.

func New

func New() *Logger

New creates a new Logger.

func (*Logger) Debug

func (l *Logger) Debug(msg string, fields ...map[string]interface{})

Debug logs a debug message.

func (*Logger) Error

func (l *Logger) Error(msg string, fields ...map[string]interface{})

Error logs an error message.

func (*Logger) ExecutionComplete

func (l *Logger) ExecutionComplete(workflow string, duration time.Duration, status string)

ExecutionComplete logs the completion of workflow execution.

func (*Logger) ExecutionStart

func (l *Logger) ExecutionStart(workflow string)

ExecutionStart logs the start of workflow execution.

func (*Logger) GoalComplete

func (l *Logger) GoalComplete(name string, duration time.Duration)

GoalComplete logs the completion of a goal.

func (*Logger) GoalStart

func (l *Logger) GoalStart(name string)

GoalStart logs the start of a goal execution.

func (*Logger) Info

func (l *Logger) Info(msg string, fields ...map[string]interface{})

Info logs an info message.

func (*Logger) PhaseComplete

func (l *Logger) PhaseComplete(phase, goal, step string, duration time.Duration, result string)

PhaseComplete logs the completion of an execution phase.

func (*Logger) PhaseStart

func (l *Logger) PhaseStart(phase, goal, step string)

PhaseStart logs the start of an execution phase.

func (*Logger) ReconcilePhase

func (l *Logger) ReconcilePhase(goal, step string, triggers []string, escalate bool)

ReconcilePhase logs the RECONCILE phase details.

func (*Logger) SecurityDecision

func (l *Logger) SecurityDecision(tool, action, reason string)

SecurityDecision logs a security decision (real-time output).

func (*Logger) SecurityWarning

func (l *Logger) SecurityWarning(msg string, fields map[string]interface{})

SecurityWarning logs a security-related warning.

func (*Logger) SetLevel

func (l *Logger) SetLevel(level Level)

SetLevel sets the minimum log level.

func (*Logger) SetOutput

func (l *Logger) SetOutput(w io.Writer)

SetOutput sets the output writer (default: stdout).

func (*Logger) SupervisePhase

func (l *Logger) SupervisePhase(goal, step string, verdict, reason string)

SupervisePhase logs the SUPERVISE phase details.

func (*Logger) SupervisorVerdict

func (l *Logger) SupervisorVerdict(goal, step, verdict, guidance string, humanRequired bool)

SupervisorVerdict logs supervisor decisions.

func (*Logger) ToolCall

func (l *Logger) ToolCall(tool string, args map[string]interface{})

ToolCall logs a tool invocation (real-time output).

func (*Logger) ToolResult

func (l *Logger) ToolResult(tool string, duration time.Duration, err error)

ToolResult logs a tool result (real-time output).

func (*Logger) Warn

func (l *Logger) Warn(msg string, fields ...map[string]interface{})

Warn logs a warning message.

func (*Logger) WithComponent

func (l *Logger) WithComponent(component string) *Logger

WithComponent returns a new logger with the given component name.

func (*Logger) WithTraceID

func (l *Logger) WithTraceID(traceID string) *Logger

WithTraceID returns a new logger with the given trace ID.

Jump to

Keyboard shortcuts

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