Skip to content

Commit

Permalink
Reduce ram usage notification level
Browse files Browse the repository at this point in the history
  • Loading branch information
rbtcollins committed May 7, 2021
1 parent 5c164c0 commit b4b8cbc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/cli/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ impl NotifyOnConsole {
NotificationLevel::Error => {
err!("{}", n);
}
NotificationLevel::Debug => {
debug!("{}", n);
}
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/utils/notifications.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ impl<'a> Notification<'a> {
pub fn level(&self) -> NotificationLevel {
use self::Notification::*;
match self {
SetDefaultBufferSize(_) => NotificationLevel::Debug,
CreatingDirectory(_, _)
| RemovingDirectory(_, _)
| LinkingDirectory(_, _)
Expand All @@ -59,7 +60,7 @@ impl<'a> Notification<'a> {
| ResumingPartialDownload
| UsingCurl
| UsingReqwest => NotificationLevel::Verbose,
RenameInUse(_, _) | SetDefaultBufferSize(_) => NotificationLevel::Info,
RenameInUse(_, _) => NotificationLevel::Info,
NoCanonicalPath(_) => NotificationLevel::Warn,
Error(_) => NotificationLevel::Error,
}
Expand Down
1 change: 1 addition & 0 deletions src/utils/notify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ pub enum NotificationLevel {
Info,
Warn,
Error,
Debug,
}

0 comments on commit b4b8cbc

Please sign in to comment.