Skip to main content

RunLog

Struct RunLog 

Source
pub struct RunLog { /* private fields */ }
Expand description

All the log messages for a CI run.

The default version collects messages, but doesn’t write them. If the output is set later, the collected messages get written there.

Implementations§

Source§

impl RunLog

Source

pub fn stdout(&mut self)

Write messages to stdout. Flush any collected messages.

Source

pub fn to_named_file( &mut self, filename: impl AsRef<Path>, ) -> Result<(), RunLogError>

Change RunLog so that further log messages are written to a named file.

Source

pub fn msgs(&self) -> &[RunLogMessage]

All messages.

Source

pub fn push(&mut self, msg: RunLogMessage)

Append a message to the run log.

Source

pub fn write(&mut self, msg: &RunLogMessage)

Output a message to stderr.

Source

pub fn read_raw(reader: impl Read) -> Result<Self, RunLogError>

Load run log file a reader. This reads the output from the “run log” serial port of QEMU and extracts the JSON lines from that for parsing.

Source

pub fn from_raw(buf: Vec<u8>) -> Result<Self, RunLogError>

Load run log from in-memory raw data. This parses the output to extract JSON Lihes.

Source

pub fn read_jsonl(reader: impl Read) -> Result<Self, RunLogError>

Load run log file a reader. This reads pure JSON Lines run log.

Source

pub fn parse_jsonl(data: Vec<u8>) -> Result<Self, RunLogError>

Parse JSON run log from memory.

Source§

impl RunLog

Source

pub fn debug(&mut self, source: RunLogSource, msg: impl Into<String>)

Source

pub fn ambient_starts<N: Into<String>, V: Into<String>>( &mut self, source: RunLogSource, name: N, version: V, )

Source

pub fn ambient_ends_successfully(&mut self, source: RunLogSource)

Source

pub fn ambient_ends_in_failure(&mut self, source: RunLogSource)

Source

pub fn ambient_runtime_config(&mut self, source: RunLogSource, config: &Config)

Source

pub fn run_ci(&mut self, source: RunLogSource, project_name: impl Into<String>)

Source

pub fn skip_ci(&mut self, source: RunLogSource, project_name: impl Into<String>)

Source

pub fn executor_starts( &mut self, source: RunLogSource, name: impl Into<String>, version: impl Into<String>, )

Source

pub fn executor_ends_successfully(&mut self, source: RunLogSource)

Source

pub fn executor_ends_in_failure(&mut self, source: RunLogSource, exit_code: i32)

Source

pub fn runnable_plan(&mut self, source: RunLogSource, plan: &RunnablePlan)

Log runnable plan at start of execution.

Source

pub fn execute_action(&mut self, source: RunLogSource, action: &RunnableAction)

Execute an action.

Source

pub fn action_succeeded( &mut self, source: RunLogSource, action: &RunnableAction, )

Action succeded.

Source

pub fn action_failed(&mut self, source: RunLogSource, action: &RunnableAction)

Action failed.

Source

pub fn deb_get(&mut self, source: RunLogSource, packages: &[Needed])

Source

pub fn npm_get_succeeded(&mut self, source: RunLogSource)

npm_get action succeeded.

Source

pub fn npm_get_failed(&mut self, log_source: RunLogSource, err: &NpmError)

npm_get action failed.

Source

pub fn custom_action_starts( &mut self, log_source: RunLogSource, source: PathBuf, custom: Custom, exe: PathBuf, exe_exists: bool, )

Custom action starts.

Source

pub fn custom_action_output( &mut self, source: RunLogSource, stdout: Vec<u8>, stderr: Vec<u8>, )

CUstom action succeeded.

Source

pub fn plan_succeeded(&mut self, source: RunLogSource)

All actions in plan succeded.

Source

pub fn start_program(&mut self, source: RunLogSource, cmd: &Command)

Start a program.

Source

pub fn program_succeeded(&mut self, source: RunLogSource, output: &Output)

Program succeeded.

Source

pub fn program_failed(&mut self, source: RunLogSource, err: &CommandError)

Program failed.

Source

pub fn start_qemu(&mut self, source: RunLogSource, cmd: &Command)

Start a program.

Source

pub fn qemu_succeeded(&mut self, source: RunLogSource, output: &Output)

Program succeeded.

Source

pub fn qemu_failed(&mut self, source: RunLogSource, err: &CommandError)

Program failed.

Trait Implementations§

Source§

impl Debug for RunLog

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RunLog

Source§

fn default() -> RunLog

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for RunLog

§

impl !RefUnwindSafe for RunLog

§

impl !Send for RunLog

§

impl !Sync for RunLog

§

impl Unpin for RunLog

§

impl UnsafeUnpin for RunLog

§

impl !UnwindSafe for RunLog

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more