mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-12-29 02:53:06 +00:00
Now we can log OS error 95
The error in #178 was being hidden from output most of the time, and because exa isn’t a GUI program, there’s nowhere it can really dump log output like this. Now that users can opt in with the EXA_DEBUG variable, there is a place it can go. Also stop the ERROR log level being printed by default.
This commit is contained in:
parent
377260d88c
commit
a5e177afe5
@ -56,6 +56,9 @@ pub fn configure_logger() {
|
||||
if present {
|
||||
logs.filter(None, log::LogLevelFilter::Debug);
|
||||
}
|
||||
else {
|
||||
logs.filter(None, log::LogLevelFilter::Off);
|
||||
}
|
||||
|
||||
if let Err(e) = logs.init() {
|
||||
writeln!(stderr(), "Failed to initialise logger: {}", e).unwrap();
|
||||
|
@ -214,9 +214,18 @@ impl<'a> Render<'a> {
|
||||
|
||||
if xattr::ENABLED {
|
||||
match file.path.attributes() {
|
||||
Ok(xs) => xattrs.extend(xs),
|
||||
Err(e) => if self.opts.xattr { errors.push((e, None)) },
|
||||
};
|
||||
Ok(xs) => {
|
||||
xattrs.extend(xs);
|
||||
}
|
||||
Err(e) => {
|
||||
if self.opts.xattr {
|
||||
errors.push((e, None));
|
||||
}
|
||||
else {
|
||||
error!("Error looking up xattr for {:?}: {:#?}", file.path, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let table_row = table.as_ref().map(|t| t.row_for_file(&file, !xattrs.is_empty()));
|
||||
|
Loading…
Reference in New Issue
Block a user