pub struct SessionLogWriter { /* private fields */ }Implementations§
Source§impl SessionLogWriter
impl SessionLogWriter
Sourcepub fn create(logs_dir: &Path, metadata: SessionLogMetadata) -> Result<Self>
pub fn create(logs_dir: &Path, metadata: SessionLogMetadata) -> Result<Self>
Create a new session log writer.
logs_dir is the base directory for session logs (e.g. ~/.zag/projects/<path>/logs).
The writer will create a sessions/ subdirectory under it for JSONL log files
and an index.json file for session metadata.
Sourcepub fn set_global_index_dir(&self, dir: PathBuf) -> Result<()>
pub fn set_global_index_dir(&self, dir: PathBuf) -> Result<()>
Set the global index directory so that session entries are also
written to ~/.zag/sessions_index.json for cross-project lookup.
pub fn log_path(&self) -> Result<PathBuf>
pub fn get_provider_session_id(&self) -> Option<String>
pub fn set_provider_session_id( &self, provider_session_id: Option<String>, ) -> Result<()>
pub fn set_completeness(&self, completeness: LogCompleteness) -> Result<()>
pub fn add_source_path(&self, path: impl Into<String>) -> Result<()>
pub fn emit(&self, source_kind: LogSourceKind, kind: LogEventKind) -> Result<()>
pub fn finish(&self, success: bool, error: Option<String>) -> Result<()>
Trait Implementations§
Source§impl Clone for SessionLogWriter
impl Clone for SessionLogWriter
Source§fn clone(&self) -> SessionLogWriter
fn clone(&self) -> SessionLogWriter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SessionLogWriter
impl RefUnwindSafe for SessionLogWriter
impl Send for SessionLogWriter
impl Sync for SessionLogWriter
impl Unpin for SessionLogWriter
impl UnsafeUnpin for SessionLogWriter
impl UnwindSafe for SessionLogWriter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more