File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ use std::collections::HashMap;
2323use std:: fs:: { DirBuilder , File } ;
2424use std:: io:: prelude:: * ;
2525use std:: path:: PathBuf ;
26- use tracing:: { trace, warn} ;
26+ use tracing:: { debug , info , trace, warn} ;
2727
2828use crate :: auth:: {
2929 authtoken:: { AuthToken , AuthTokenScope } ,
@@ -244,7 +244,7 @@ impl State {
244244 Some ( auth)
245245 }
246246 Err ( x) => {
247- warn ! (
247+ info ! (
248248 "Corrupted cache file {}: {:?}. Removing " ,
249249 fname. display( ) ,
250250 x
@@ -254,13 +254,17 @@ impl State {
254254 }
255255 } ,
256256 _ => {
257- warn ! ( "Error reading file {}" , fname. display( ) ) ;
257+ // Not able to read file, maybe it is corrupted. There is nothing user can
258+ // or is expected to do about it, but it make sense to make user aware of.
259+ info ! ( "Error reading file {}" , fname. display( ) ) ;
258260 None
259261 }
260262 }
261263 }
262264 _ => {
263- warn ! ( "Error opening file {}" , fname. display( ) ) ;
265+ // Not able to open file, maybe it is missing. There is nothing user can or is
266+ // expected to do about it.
267+ debug ! ( "Error opening file {}" , fname. display( ) ) ;
264268 None
265269 }
266270 }
You can’t perform that action at this time.
0 commit comments