Class: Taski::Progress::Layout::Log

Inherits:
Base show all
Defined in:
lib/taski/progress/layout/log.rb

Overview

Log layout for non-TTY environments (CI, log files, piped output). Outputs plain text without terminal escape codes.

Output format:

[START] TaskName
[DONE] TaskName (123.4ms)
[FAIL] TaskName: Error message

Uses Theme::Plain by default to ensure no ANSI escape codes in output.

Instance Attribute Summary

Attributes inherited from Base

#spinner_index

Attributes inherited from Execution::TaskObserver

#context

Instance Method Summary collapse

Methods inherited from Base

#on_group_completed, #on_group_started, #on_ready, #on_start, #on_stop, #on_task_updated, #queue_message, #render_template_string, #start_spinner_timer, #stop_spinner_timer, #task_registered?, #task_state

Methods inherited from Execution::TaskObserver

#on_group_completed, #on_group_started, #on_ready, #on_start, #on_stop, #on_task_updated

Constructor Details

#initialize(output: $stderr, theme: nil) ⇒ Log

Returns a new instance of Log.



19
20
21
22
23
# File 'lib/taski/progress/layout/log.rb', line 19

def initialize(output: $stderr, theme: nil)
  theme ||= Theme::Plain.new
  super
  @output.sync = true if @output.respond_to?(:sync=)
end