aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2017-01-23 08:45:40 -0800
committerJoe Wilm <jwilm@users.noreply.github.com>2017-01-23 09:14:01 -0800
commitee37dc86abb3257458d5832e4448ded8a0d2b0a7 (patch)
treead354108ed76895790ff202a7037925bd32f0b7a /src/main.rs
parentabd3958cb54925935b7013555ac58ae65896f7ed (diff)
downloadalacritty-ee37dc86abb3257458d5832e4448ded8a0d2b0a7.tar.gz
alacritty-ee37dc86abb3257458d5832e4448ded8a0d2b0a7.zip
Return an error from logging::initialize
Logging initialization now shares the same error handling code as the rest of the `run` function.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index 265a9ee8..dd511cce 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -60,9 +60,6 @@ fn main() {
// Load command line options
let options = cli::Options::load();
- // Initialize the logger before entering alacritty main loop
- logging::initialize(&options);
-
// Run alacritty
if let Err(err) = run(config, options) {
die!("Alacritty encountered an unrecoverable error:\n\n\t{}\n", Red(err));
@@ -77,6 +74,9 @@ fn main() {
/// Creates a window, the terminal state, pty, I/O event loop, input processor,
/// config change monitor, and runs the main display loop.
fn run(mut config: Config, options: cli::Options) -> Result<(), Box<Error>> {
+ // Initialize the logger first as to capture output from other subsystems
+ logging::initialize(&options)?;
+
info!("Welcome to Alacritty.");
// Create a display.