treewide: make logging format more consistent; make clipboard persistence opt-in

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I9092f93c29fcbe99c90483875f4acd0c6a6a6964
This commit is contained in:
raf 2026-04-03 13:59:09 +03:00
commit da9bf5ea3e
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
11 changed files with 44 additions and 32 deletions

View file

@ -175,7 +175,7 @@ unsafe fn fork_and_serve(prepared: PreparedCopy) -> PersistenceResult<()> {
pid => {
// Parent process, store child PID for loop detection
log::debug!("Forked clipboard persistence process (pid: {pid})");
log::debug!("forked clipboard persistence process (pid: {pid})");
SERVING_PID.store(pid, Ordering::SeqCst);
Ok(())
},
@ -185,18 +185,18 @@ unsafe fn fork_and_serve(prepared: PreparedCopy) -> PersistenceResult<()> {
/// Child process entry point for serving clipboard data.
fn serve_clipboard_child(prepared: PreparedCopy) {
let pid = std::process::id() as i32;
log::debug!("Clipboard persistence child process started (pid: {pid})");
log::debug!("clipboard persistence child process started (pid: {pid})");
// Serve clipboard requests. The PreparedCopy::serve() method blocks and
// handles all the Wayland protocol interactions internally via
// wl-clipboard-rs
match prepared.serve() {
Ok(()) => {
log::debug!("Clipboard persistence: serve completed normally");
log::debug!("clipboard persistence: serve completed normally");
},
Err(e) => {
log::error!("Clipboard persistence: serve failed: {e}");
log::error!("clipboard persistence: serve failed: {e}");
exit(1);
},
}