From 6f9ca23720ff0943c230b213418cb664a23d4d40 Mon Sep 17 00:00:00 2001 From: Arshdeep54 Date: Thu, 19 Dec 2024 21:37:09 +0530 Subject: [PATCH] correct log file path --- src/lib/logger.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/logger.rs b/src/lib/logger.rs index b5a29d5..75106bd 100644 --- a/src/lib/logger.rs +++ b/src/lib/logger.rs @@ -5,9 +5,10 @@ use std::io::Result; pub fn log(filetype: &str, status: &str, message: &str) -> Result<()> { let filename = match filetype { - "ssh" => "ssh.logs", - "sudo" => "sudo.logs", - "su" => "su.logs", + "ssh" => "/opt/watchdog/custom-logs/ssh.logs", + "sudo" => "/opt/watchdog/custom-logs/sudo.logs", + "su" => "/opt/watchdog/custom-logs/su.logs", + "auth" => "/opt/watchdog/custom-logs/auth.logs", _ => return Err(std::io::Error::new(std::io::ErrorKind::InvalidInput, "Invalid filetype")), };