Skip to main content

agent_first_psql/
logutil.rs

1use crate::config;
2use crate::protocol::log_event;
3use crate::types::{Output, Trace};
4
5pub fn build_startup_log(
6    session: Option<&str>,
7    args: &serde_json::Value,
8    env: &serde_json::Value,
9) -> Output {
10    Output::Log {
11        event: log_event::STARTUP.to_string(),
12        request_id: None,
13        session: session.map(std::string::ToString::to_string),
14        error_code: None,
15        command_tag: None,
16        version: Some(config::VERSION.to_string()),
17        config: None,
18        args: Some(args.clone()),
19        env: Some(env.clone()),
20        chain: None,
21        trace: Trace::only_duration(0),
22    }
23}