diff --git a/rust/pact_matching/src/logging.rs b/rust/pact_matching/src/logging.rs index afc37ee3..818b72ff 100644 --- a/rust/pact_matching/src/logging.rs +++ b/rust/pact_matching/src/logging.rs @@ -17,16 +17,19 @@ lazy_static! { /// Accumulates the log entries against a task local ID. If the ID is not set, accumulates against /// the "global" ID. /// cbindgen:ignore + #[deprecated(note = "This must be moved to the FFI crate")] static ref LOG_BUFFER: Mutex> = Mutex::new(HashMap::new()); } task_local! { /// Log ID to accumulate logs against #[allow(missing_docs)] + #[deprecated(note = "This must be moved to the FFI crate")] pub static LOG_ID: String; } /// Fetches the contents from the id scoped in-memory buffer and empties the buffer. +#[deprecated(note = "This must be moved to the FFI crate")] pub fn fetch_buffer_contents(id: &str) -> Bytes { let mut inner = LOG_BUFFER.lock().unwrap(); let buffer = inner.entry(id.to_string()) @@ -36,6 +39,7 @@ pub fn fetch_buffer_contents(id: &str) -> Bytes { /// Writes the provided bytes to the task local ID scoped in-memory buffer. If there is no /// task local ID set, will write to the "global" buffer. +#[deprecated(note = "This must be moved to the FFI crate")] pub fn write_to_log_buffer(buf: &[u8]) { let id = LOG_ID.try_with(|id| id.clone()).unwrap_or_else(|_| "global".into()); let mut inner = LOG_BUFFER.lock().unwrap();