This is the reference documentation of
run() wrapper class that captures subprocess
stderr streams independently, resynthesizing and colorizing the streams appropriately.
OutputCollector(cmd::AbstractCmd; verbose::Bool = false)
cmd, and collect the output such that
stderr are captured independently, but with the time of each line recorded such that they can be stored/analyzed independently, but replayed synchronously.
Pipe that has been initialized by
spawn(), create an async Task to read in lines as they come in and annotate the time the line was captured for later replay/merging with other simultaneously captured streams.
merge(collector::OutputCollector; colored::Bool = false)
Merge the stdout and stderr streams of the
OutputCollector on a per-line basis, returning a single string containing all collected lines, interleaved by capture time. If
colored is set to true, embeds terminal color codes to print
stderr in red.
Returns all stderr lines collected by this collector so far.
Returns all stdout lines collected by this collector so far.
tail(collector::OutputCollector; len::Int = 100, colored::Bool = false)
Write out the last
len lines, optionally writing colored lines.
tee(c::OutputCollector; colored::Bool = false, stream::IO = stdout)
Spawn a background task to incrementally output lines from
collector to the standard output, optionally colored.
Wait for the command and all line streams within an
OutputCollector to finish their respective tasks and be ready for full merging. Return the success of the underlying process. Prints out the last 10 lines of the process if it does not complete successfully unless the OutputCollector was created as
true if the task owned by this
LineStream is still processing output from an underlying
Given a collection of delimiter characters, read from
s until one of those delimiters is reached, or we reach the end of