diff options
author | Joe Wilm <joe@jwilm.com> | 2017-01-23 08:45:40 -0800 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2017-01-23 09:14:01 -0800 |
commit | ee37dc86abb3257458d5832e4448ded8a0d2b0a7 (patch) | |
tree | ad354108ed76895790ff202a7037925bd32f0b7a /src/logging.rs | |
parent | abd3958cb54925935b7013555ac58ae65896f7ed (diff) | |
download | alacritty-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/logging.rs')
-rw-r--r-- | src/logging.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/logging.rs b/src/logging.rs index 1e6b1e42..f5340d05 100644 --- a/src/logging.rs +++ b/src/logging.rs @@ -53,9 +53,9 @@ impl<T: Send + io::Write> log::Log for Logger<T> { } } -pub fn initialize(options: &cli::Options) { +pub fn initialize(options: &cli::Options) -> Result<(), log::SetLoggerError> { log::set_logger(|max_log_level| { max_log_level.set(options.log_level); Box::new(Logger::new(io::stdout(), options.log_level)) - }).unwrap_or_else(|e| die!("{}", e)); + }) } |