Skip to content

Commit

Permalink
correct log file path
Browse files Browse the repository at this point in the history
  • Loading branch information
Arshdeep54 committed Dec 19, 2024
1 parent 5a166ad commit 6f9ca23
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/lib/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")),
};

Expand Down

0 comments on commit 6f9ca23

Please sign in to comment.