|
|
@@ -48,12 +48,16 @@ fn main() {
|
|
|
|
|
|
/// Sets up a global logger if one is asked for.
|
|
|
/// The ‘EXA_DEBUG’ environment variable controls whether log messages are
|
|
|
-/// displayed or not. Currently there are just two settings (on and off)
|
|
|
+/// displayed or not. Currently there are just two settings (on and off).
|
|
|
+///
|
|
|
+/// This can’t be done in exa’s own option parsing because that part of it
|
|
|
+/// logs as well, so by the time execution gets there, the logger needs to
|
|
|
+/// have already been set up.
|
|
|
pub fn configure_logger() {
|
|
|
extern crate env_logger;
|
|
|
extern crate log;
|
|
|
|
|
|
- let present = match var_os("EXA_DEBUG") {
|
|
|
+ let present = match var_os(exa::vars::EXA_DEBUG) {
|
|
|
Some(debug) => debug.len() > 0,
|
|
|
None => false,
|
|
|
};
|