diff --git a/tracing-surreal/src/tracing_msg.rs b/tracing-surreal/src/tracing_msg.rs index 01c7827..0134858 100644 --- a/tracing-surreal/src/tracing_msg.rs +++ b/tracing-surreal/src/tracing_msg.rs @@ -23,3 +23,13 @@ pub struct ClientHandshake { pub proc_id: u32, pub msg_format: MsgFormat, } + +// Need to gate this under `experimental` feature flag. +#[doc(hidden)] +pub fn current_exe_name() -> std::io::Result { + Ok(std::env::current_exe()? + .file_name() + .expect("this should not happen here") + .to_string_lossy() + .into()) +}