Documentation
¶
Overview ¶
Package progress provides timestamped logging to file and stdout with color support.
Index ¶
- type Colors
- type Config
- type Logger
- func (l *Logger) Close() error
- func (l *Logger) Elapsed() string
- func (l *Logger) Error(format string, args ...any)
- func (l *Logger) Path() string
- func (l *Logger) Print(format string, args ...any)
- func (l *Logger) PrintAligned(text string)
- func (l *Logger) PrintRaw(format string, args ...any)
- func (l *Logger) PrintSection(name string)
- func (l *Logger) SetPhase(phase Phase)
- func (l *Logger) Warn(format string, args ...any)
- type Phase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Colors ¶ added in v0.2.0
type Colors struct {
// contains filtered or unexported fields
}
Colors holds all color configuration for output formatting. use NewColors to create from config.ColorConfig.
func NewColors ¶ added in v0.2.0
func NewColors(cfg config.ColorConfig) *Colors
NewColors creates Colors from config.ColorConfig. all colors must be provided - use config with embedded defaults fallback. panics if any color value is invalid (configuration error).
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 ¶
NewLogger creates a logger writing to both a progress file and stdout. colors must be provided (created via NewColors from config).
func (*Logger) PrintAligned ¶
PrintAligned writes text with timestamp on each line, suppressing empty lines.
func (*Logger) PrintSection ¶
PrintSection writes a section header without timestamp in yellow. format: "\n--- {name} ---\n"