progress

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package progress provides timestamped logging to file and stdout with color support.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	PlanFile string // plan filename (used to derive progress filename)
	Mode     string // execution mode: full, review, codex-only
	Branch   string // current git branch
	NoColor  bool   // disable color output (sets color.NoColor globally)
}

Config holds logger configuration.

type Logger

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

Logger writes timestamped output to both file and stdout.

func NewLogger

func NewLogger(cfg Config) (*Logger, error)

NewLogger creates a logger writing to both a progress file and stdout.

func (*Logger) Close

func (l *Logger) Close() error

Close writes footer and closes the progress file.

func (*Logger) Elapsed

func (l *Logger) Elapsed() string

Elapsed returns formatted elapsed time since start.

func (*Logger) Error

func (l *Logger) Error(format string, args ...any)

Error writes an error message in red.

func (*Logger) Path

func (l *Logger) Path() string

Path returns the progress file path.

func (*Logger) Print

func (l *Logger) Print(format string, args ...any)

Print writes a timestamped message to both file and stdout.

func (*Logger) PrintAligned

func (l *Logger) PrintAligned(text string)

PrintAligned writes text with timestamp on each line, suppressing empty lines.

func (*Logger) PrintRaw

func (l *Logger) PrintRaw(format string, args ...any)

PrintRaw writes without timestamp (for streaming output).

func (*Logger) PrintSection

func (l *Logger) PrintSection(name string)

PrintSection writes a section header without timestamp in yellow. format: "\n--- {name} ---\n"

func (*Logger) SetPhase

func (l *Logger) SetPhase(phase Phase)

SetPhase sets the current execution phase for color coding.

func (*Logger) Warn

func (l *Logger) Warn(format string, args ...any)

Warn writes a warning message in yellow.

type Phase

type Phase string

Phase represents execution phase for color coding.

const (
	PhaseTask       Phase = "task"        // execution phase (green)
	PhaseReview     Phase = "review"      // code review phase (cyan)
	PhaseCodex      Phase = "codex"       // codex analysis phase (magenta)
	PhaseClaudeEval Phase = "claude-eval" // claude evaluating codex (bright cyan)
)

Phase constants for execution stages.

Jump to

Keyboard shortcuts

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