From 24f2d499f3c9f3197c81cb75ea72d9563d341a5d Mon Sep 17 00:00:00 2001 From: Drakulix Date: Sat, 25 Nov 2017 13:55:26 +0100 Subject: [PATCH] Add more logging to session --- src/backend/session/direct.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/backend/session/direct.rs b/src/backend/session/direct.rs index 741096d..2aad341 100644 --- a/src/backend/session/direct.rs +++ b/src/backend/session/direct.rs @@ -250,11 +250,14 @@ impl Session for DirectSession { type Error = NixError; fn open(&mut self, path: &Path, flags: OFlag) -> NixResult { - info!(self.logger, "Opening device: {:?}", path); - open(path, flags, Mode::empty()) + debug!(self.logger, "Opening device: {:?}", path); + let fd = open(path, flags, Mode::empty())?; + trace!(self.logger, "Fd num: {:?}", fd); + Ok(fd) } fn close(&mut self, fd: RawFd) -> NixResult<()> { + debug!(self.logger, "Closing device: {:?}", fd); close(fd) }