Commit 4afb1ea2 authored by Alexis Janon's avatar Alexis Janon
Browse files

Replaced some warnings with a debug log level

Decrease the amount of logging.
Warnings changed:
- CreateDir: already exists, does not exist (rollback)
- RemoveDir: does not exist, already exists (rollback)
- GetSetValue: does not exist
These warnings were very frequent, and cluttered logs
parent 657af15e
Pipeline #4120 passed with stage
in 2 minutes and 18 seconds
......@@ -26,7 +26,7 @@ impl Command for CreateDir {
}
match fs::create_dir(&self.path) {
Err(ref err) if err.kind() == io::ErrorKind::AlreadyExists => {
warn!(
debug!(
"Could not create directory {}: already exists",
self.path.display()
);
......@@ -50,7 +50,7 @@ impl Command for CreateDir {
}
match fs::remove_dir(&self.path) {
Err(ref err) if err.kind() == io::ErrorKind::NotFound => {
warn!(
debug!(
"{{rollback}} Could not remove directory {}: not found",
self.path.display()
);
......
......@@ -29,7 +29,7 @@ impl Command for GetSetValue {
return Err(err);
}
if !self.path.exists() {
warn!("Could not find file {}", self.path.display());
debug!("Could not find file {}", self.path.display());
return Ok(CommandResult::from(()));
}
debug!("Reading and writing {}", self.path.display());
......
......@@ -25,7 +25,7 @@ impl Command for RemoveDir {
}
match fs::remove_dir(&self.path) {
Err(ref err) if err.kind() == io::ErrorKind::NotFound => {
warn!(
debug!(
"Could not remove directory {}: not found",
self.path.display()
);
......@@ -49,7 +49,7 @@ impl Command for RemoveDir {
}
match fs::create_dir(&self.path) {
Err(ref err) if err.kind() == io::ErrorKind::AlreadyExists => {
warn!(
debug!(
"{{rollback}} Could not create directory {}: already exists",
self.path.display()
);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment