Error Log • Rust AI Agent SDK

ErrorLog: Error log entry

ErrorLog

Defined in the Display Types module.

Rust AI Agent SDK

Error log entry

Fields

NameTypeDescription
messageStringError message
error_typeStringError type/category
timestampstd::time::SystemTimeTimestamp
contextHashMap<StringAdditional context

Methods

new

rust
fn new(message: impl Into<String>, error_type: impl Into<String>) -> Self

Create a new error log

Parameters:

NameType
messageimpl Into&lt;String&gt;
error_typeimpl Into&lt;String&gt;

with_context

rust
fn with_context(mut self, key: impl Into<String>, value: impl Into<String>) -> Self

Add context

Parameters:

NameType
keyimpl Into&lt;String&gt;
valueimpl Into&lt;String&gt;

Source

View on GitHub

praisonai/src/parity/display_types.rs at line 38


Related Documentation