From cf16ca4b1288347bfc3d3b1aec2d8769618f00b1 Mon Sep 17 00:00:00 2001 From: pjht Date: Wed, 4 Sep 2024 10:48:28 -0500 Subject: [PATCH] Add try_get_syslog_msg to IPC crate --- syslog_msg_ipc/src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/syslog_msg_ipc/src/lib.rs b/syslog_msg_ipc/src/lib.rs index acfbbca..dcc5228 100644 --- a/syslog_msg_ipc/src/lib.rs +++ b/syslog_msg_ipc/src/lib.rs @@ -33,3 +33,7 @@ pub fn get_syslog_msg() -> syslog_structs::Message { ipc::process_messages(); } } + +pub fn try_get_syslog_msg() -> Option { + MSG_BUF.lock().pop_front() +}