aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/logging.rs
diff options
context:
space:
mode:
authorKirill Chibisov <wchibisovkirill@gmail.com>2019-10-14 23:34:54 +0300
committerChristian Duerr <contact@christianduerr.com>2019-10-14 22:34:54 +0200
commit124e98e94e66d5790d4523adb9cd75f85a4691f4 (patch)
treea88e8ae7dcc035fee159dc142a35eb484dbd4fe8 /alacritty/src/logging.rs
parent401c2aab964b60e8c3b072e5098ba8e366d04944 (diff)
downloadr-alacritty-124e98e94e66d5790d4523adb9cd75f85a4691f4.tar.gz
r-alacritty-124e98e94e66d5790d4523adb9cd75f85a4691f4.tar.bz2
r-alacritty-124e98e94e66d5790d4523adb9cd75f85a4691f4.zip
Fix logged config path separators on Windows
It was discovered that we were logging path with `\\` instead of `\` as separators on Windows due to use of Debug formatting instead of Display for paths.
Diffstat (limited to 'alacritty/src/logging.rs')
-rw-r--r--alacritty/src/logging.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/alacritty/src/logging.rs b/alacritty/src/logging.rs
index d1c95e43..ea44637b 100644
--- a/alacritty/src/logging.rs
+++ b/alacritty/src/logging.rs
@@ -45,8 +45,8 @@ pub fn initialize(
// Use env_logger if RUST_LOG environment variable is defined. Otherwise,
// use the alacritty-only logger.
- if ::std::env::var("RUST_LOG").is_ok() {
- ::env_logger::try_init()?;
+ if std::env::var("RUST_LOG").is_ok() {
+ env_logger::try_init()?;
Ok(None)
} else {
let logger = Logger::new(event_proxy);
@@ -172,7 +172,7 @@ impl OnDemandLogFile {
Ok(file) => {
self.file = Some(io::LineWriter::new(file));
self.created.store(true, Ordering::Relaxed);
- let _ = writeln!(io::stdout(), "Created log file at {:?}", self.path);
+ let _ = writeln!(io::stdout(), "Created log file at \"{}\"", self.path.display());
},
Err(e) => {
let _ = writeln!(io::stdout(), "Unable to create log file: {}", e);