summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2018-01-18 15:40:50 +0100
committerGitHub <noreply@github.com>2018-01-18 15:40:50 +0100
commit3735fbac2f68729bf5c855636179e6f3ea038f5d (patch)
treeafdffc99cf25276ccb8962c292535db9fee36fe1
parentd5569cea63e46f7ba1ab2ee6c8d482db34784ee1 (diff)
parentfcfc397fc892782c197b9a56cf897e9f08c3317b (diff)
downloadimag-3735fbac2f68729bf5c855636179e6f3ea038f5d.zip
imag-3735fbac2f68729bf5c855636179e6f3ea038f5d.tar.gz
Merge pull request #1166 from matthiasbeyer/log-0-4-0
Dependency update: log 0.4.0
-rw-r--r--bin/core/imag-annotate/Cargo.toml2
-rw-r--r--bin/core/imag-gps/Cargo.toml2
-rw-r--r--bin/core/imag-link/Cargo.toml2
-rw-r--r--bin/core/imag-mv/Cargo.toml2
-rw-r--r--bin/core/imag-ref/Cargo.toml2
-rw-r--r--bin/core/imag-store/Cargo.toml2
-rw-r--r--bin/core/imag-tag/Cargo.toml4
-rw-r--r--bin/core/imag-tag/src/main.rs3
-rw-r--r--bin/core/imag-view/Cargo.toml2
-rw-r--r--bin/core/imag/Cargo.toml2
-rw-r--r--bin/domain/imag-bookmark/Cargo.toml2
-rw-r--r--bin/domain/imag-contact/Cargo.toml2
-rw-r--r--bin/domain/imag-diary/Cargo.toml2
-rw-r--r--bin/domain/imag-mail/Cargo.toml2
-rw-r--r--bin/domain/imag-notes/Cargo.toml2
-rw-r--r--bin/domain/imag-timetrack/Cargo.toml2
-rw-r--r--bin/domain/imag-todo/Cargo.toml2
-rw-r--r--lib/core/libimagerror/Cargo.toml2
-rw-r--r--lib/core/libimagrt/Cargo.toml8
-rw-r--r--lib/core/libimagrt/src/logger.rs47
-rw-r--r--lib/core/libimagrt/src/runtime.rs26
-rw-r--r--lib/core/libimagstore/Cargo.toml4
-rw-r--r--lib/domain/libimagdiary/Cargo.toml2
-rw-r--r--lib/domain/libimagmail/Cargo.toml2
-rw-r--r--lib/domain/libimagnotes/Cargo.toml2
-rw-r--r--lib/domain/libimagtodo/Cargo.toml2
-rw-r--r--lib/entry/libimagentrycategory/Cargo.toml4
-rw-r--r--lib/entry/libimagentrycategory/src/register.rs2
-rw-r--r--lib/entry/libimagentryfilter/Cargo.toml2
-rw-r--r--lib/entry/libimagentrygps/Cargo.toml2
-rw-r--r--lib/entry/libimagentrygps/src/entry.rs3
-rw-r--r--lib/entry/libimagentrylink/Cargo.toml4
-rw-r--r--lib/entry/libimagentrylink/src/external.rs2
-rw-r--r--lib/entry/libimagentrylink/src/internal.rs3
-rw-r--r--lib/entry/libimagentrylist/Cargo.toml2
-rw-r--r--lib/entry/libimagentrymarkdown/Cargo.toml4
-rw-r--r--lib/entry/libimagentrymarkdown/src/processor.rs3
-rw-r--r--lib/entry/libimagentryref/Cargo.toml2
-rw-r--r--lib/entry/libimagentrytag/Cargo.toml2
-rw-r--r--lib/entry/libimagentryview/Cargo.toml2
-rw-r--r--lib/etc/libimaginteraction/Cargo.toml2
-rw-r--r--lib/etc/libimagtimeui/Cargo.toml2
-rw-r--r--lib/etc/libimagutil/Cargo.toml2
43 files changed, 90 insertions, 85 deletions
diff --git a/bin/core/imag-annotate/Cargo.toml b/bin/core/imag-annotate/Cargo.toml
index 3a37f1d..ddcb897 100644
--- a/bin/core/imag-annotate/Cargo.toml
+++ b/bin/core/imag-annotate/Cargo.toml
@@ -21,7 +21,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
clap = ">=2.17"
-log = "0.3"
+log = "0.4.0"
url = "1.2"
toml = "0.4"
toml-query = "0.6"
diff --git a/bin/core/imag-gps/Cargo.toml b/bin/core/imag-gps/Cargo.toml
index fc4e1c6..ecd1c49 100644
--- a/bin/core/imag-gps/Cargo.toml
+++ b/bin/core/imag-gps/Cargo.toml
@@ -21,7 +21,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
clap = ">=2.17"
-log = "0.3"
+log = "0.4.0"
url = "1.2"
toml = "0.4"
toml-query = "0.6"
diff --git a/bin/core/imag-link/Cargo.toml b/bin/core/imag-link/Cargo.toml
index 5474648..d56cb05 100644
--- a/bin/core/imag-link/Cargo.toml
+++ b/bin/core/imag-link/Cargo.toml
@@ -21,7 +21,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
clap = ">=2.17"
-log = "0.3"
+log = "0.4.0"
url = "1.5"
toml = "0.4"
toml-query = "0.6"
diff --git a/bin/core/imag-mv/Cargo.toml b/bin/core/imag-mv/Cargo.toml
index 4c4cb91..b941ff4 100644
--- a/bin/core/imag-mv/Cargo.toml
+++ b/bin/core/imag-mv/Cargo.toml
@@ -21,7 +21,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
clap = ">=2.17"
-log = "0.3"
+log = "0.4.0"
libimagrt = { version = "0.6.0", path = "../../../lib/core/libimagrt" }
libimagerror = { version = "0.6.0", path = "../../../lib/core/libimagerror" }
diff --git a/bin/core/imag-ref/Cargo.toml b/bin/core/imag-ref/Cargo.toml
index 51f8d29..76b80a6 100644
--- a/bin/core/imag-ref/Cargo.toml
+++ b/bin/core/imag-ref/Cargo.toml
@@ -21,7 +21,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
clap = ">=2.17"
-log = "0.3"
+log = "0.4.0"
libimagrt = { version = "0.6.0", path = "../../../lib/core/libimagrt" }
libimagerror = { version = "0.6.0", path = "../../../lib/core/libimagerror" }
diff --git a/bin/core/imag-store/Cargo.toml b/bin/core/imag-store/Cargo.toml
index 6102a75..93a89f9 100644
--- a/bin/core/imag-store/Cargo.toml
+++ b/bin/core/imag-store/Cargo.toml
@@ -21,7 +21,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
clap = ">=2.17"
-log = "0.3"
+log = "0.4.0"
toml = "0.4"
error-chain = "0.11"
diff --git a/bin/core/imag-tag/Cargo.toml b/bin/core/imag-tag/Cargo.toml
index a37d4b2..02d821e 100644
--- a/bin/core/imag-tag/Cargo.toml
+++ b/bin/core/imag-tag/Cargo.toml
@@ -21,7 +21,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
clap = ">=2.17"
-log = "0.3"
+log = "0.4.0"
toml = "0.4"
libimagstore = { version = "0.6.0", path = "../../../lib/core/libimagstore" }
@@ -32,7 +32,7 @@ libimagutil = { version = "0.6.0", path = "../../../lib/etc/libimagutil" }
[dev-dependencies]
toml-query = "0.6"
-env_logger = "0.4"
+env_logger = "0.5"
[dev-dependencies.libimagutil]
version = "0.6.0"
diff --git a/bin/core/imag-tag/src/main.rs b/bin/core/imag-tag/src/main.rs
index beceee1..d601f2b 100644
--- a/bin/core/imag-tag/src/main.rs
+++ b/bin/core/imag-tag/src/main.rs
@@ -273,8 +273,7 @@ mod tests {
}
fn setup_logging() {
- use env_logger;
- let _ = env_logger::init().unwrap_or(());
+ let _ = ::env_logger::try_init();
}
#[test]
diff --git a/bin/core/imag-view/Cargo.toml b/bin/core/imag-view/Cargo.toml
index 0b78fd7..e31c34f 100644
--- a/bin/core/imag-view/Cargo.toml
+++ b/bin/core/imag-view/Cargo.toml
@@ -21,7 +21,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
clap = ">=2.17"
-log = "0.3"
+log = "0.4.0"
toml = "0.4"
toml-query = "0.6"
handlebars = "0.29.0"
diff --git a/bin/core/imag/Cargo.toml b/bin/core/imag/Cargo.toml
index 5bd6dac..4d9462b 100644
--- a/bin/core/imag/Cargo.toml
+++ b/bin/core/imag/Cargo.toml
@@ -22,7 +22,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
walkdir = "1"
clap = ">=2.17"
-log = "0.3"
+log = "0.4.0"
toml = "0.4"
toml-query = "0.6"
diff --git a/bin/domain/imag-bookmark/Cargo.toml b/bin/domain/imag-bookmark/Cargo.toml
index 15a2076..634fcb6 100644
--- a/bin/domain/imag-bookmark/Cargo.toml
+++ b/bin/domain/imag-bookmark/Cargo.toml
@@ -21,7 +21,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
clap = ">=2.17"
-log = "0.3"
+log = "0.4.0"
toml = "0.4"
toml-query = "0.6"
diff --git a/bin/domain/imag-contact/Cargo.toml b/bin/domain/imag-contact/Cargo.toml
index e51d7f8..0c94907 100644
--- a/bin/domain/imag-contact/Cargo.toml
+++ b/bin/domain/imag-contact/Cargo.toml
@@ -15,7 +15,7 @@ homepage = "http://imag-pim.org"
[dependencies]
clap = ">=2.17"
-log = "0.3"
+log = "0.4.0"
toml = "0.4"
toml-query = "0.6"
handlebars = "0.29"
diff --git a/bin/domain/imag-diary/Cargo.toml b/bin/domain/imag-diary/Cargo.toml
index db49445..922a52e 100644
--- a/bin/domain/imag-diary/Cargo.toml
+++ b/bin/domain/imag-diary/Cargo.toml
@@ -22,7 +22,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
chrono = "0.4"
clap = ">=2.17"
-log = "0.3"
+log = "0.4.0"
toml = "0.4"
toml-query = "0.6"
diff --git a/bin/domain/imag-mail/Cargo.toml b/bin/domain/imag-mail/Cargo.toml
index 4666164..9fef00d 100644
--- a/bin/domain/imag-mail/Cargo.toml
+++ b/bin/domain/imag-mail/Cargo.toml
@@ -17,7 +17,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
clap = ">=2.17"
-log = "0.3"
+log = "0.4.0"
libimagrt = { version = "0.6.0", path = "../../../lib/core/libimagrt" }
libimagerror = { version = "0.6.0", path = "../../../lib/core/libimagerror" }
diff --git a/bin/domain/imag-notes/Cargo.toml b/bin/domain/imag-notes/Cargo.toml
index a9b6446..2d77b65 100644
--- a/bin/domain/imag-notes/Cargo.toml
+++ b/bin/domain/imag-notes/Cargo.toml
@@ -21,7 +21,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
clap = ">=2.17"
-log = "0.3"
+log = "0.4.0"
itertools = "0.7"
libimagrt = { version = "0.6.0", path = "../../../lib/core/libimagrt" }
diff --git a/bin/domain/imag-timetrack/Cargo.toml b/bin/domain/imag-timetrack/Cargo.toml
index 84bf4fa..e370820 100644
--- a/bin/domain/imag-timetrack/Cargo.toml
+++ b/bin/domain/imag-timetrack/Cargo.toml
@@ -21,7 +21,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
clap = ">=2.17"
-log = "0.3"
+log = "0.4.0"
chrono = "0.4"
filters = "0.2"
itertools = "0.7"
diff --git a/bin/domain/imag-todo/Cargo.toml b/bin/domain/imag-todo/Cargo.toml
index d219460..9c2c3c8 100644
--- a/bin/domain/imag-todo/Cargo.toml
+++ b/bin/domain/imag-todo/Cargo.toml
@@ -21,7 +21,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
clap = ">=2.17"
-log = "0.3"
+log = "0.4.0"
toml = "0.4"
toml-query = "0.6"
is-match = "0.1"
diff --git a/lib/core/libimagerror/Cargo.toml b/lib/core/libimagerror/Cargo.toml
index 9cef709..56f1417 100644
--- a/lib/core/libimagerror/Cargo.toml
+++ b/lib/core/libimagerror/Cargo.toml
@@ -20,5 +20,5 @@ is-it-maintained-open-issues = { repository = "matthiasbeyer/imag" }
maintenance = { status = "actively-developed" }
[dependencies]
-log = "0.3"
+log = "0.4.0"
ansi_term = "0.10"
diff --git a/lib/core/libimagrt/Cargo.toml b/lib/core/libimagrt/Cargo.toml
index 437b7f4..5fd673d 100644
--- a/lib/core/libimagrt/Cargo.toml
+++ b/lib/core/libimagrt/Cargo.toml
@@ -21,9 +21,8 @@ maintenance = { status = "actively-developed" }
[dependencies]
clap = ">=2.17"
-env_logger = "0.4"
+env_logger = "0.5"
toml = "0.4"
-log = "0.3"
xdg-basedir = "1.0"
itertools = "0.7"
ansi_term = "0.10"
@@ -37,6 +36,11 @@ libimagerror = { version = "0.6.0", path = "../../../lib/core/libimagerror" }
libimagutil = { version = "0.6.0", path = "../../../lib/etc/libimagutil" }
libimaginteraction = { version = "0.6.0", path = "../../../lib/etc/libimaginteraction" }
+[dependencies.log]
+version = "0.4.0-rc.1"
+default-features = false
+features = ["std"]
+
[features]
default = []
diff --git a/lib/core/libimagrt/src/logger.rs b/lib/core/libimagrt/src/logger.rs
index 0aa92d5..6e80321 100644
--- a/lib/core/libimagrt/src/logger.rs
+++ b/lib/core/libimagrt/src/logger.rs
@@ -30,7 +30,7 @@ use error::ResultExt;
use runtime::Runtime;
use clap::ArgMatches;
-use log::{Log, LogLevel, LogRecord, LogMetadata};
+use log::{Log, Level, Record, Metadata};
use toml::Value;
use toml_query::read::TomlValueReadExt;
use toml_query::read::TomlValueReadTypeExt;
@@ -52,7 +52,7 @@ impl Default for LogDestination {
struct ModuleSettings {
enabled: bool,
- level: Option<LogLevel>,
+ level: Option<Level>,
#[allow(unused)]
destinations: Option<Vec<LogDestination>>,
@@ -60,7 +60,7 @@ struct ModuleSettings {
/// Logger implementation for `log` crate.
pub struct ImagLogger {
- global_loglevel : LogLevel,
+ global_loglevel : Level,
#[allow(unused)]
global_destinations : Vec<LogDestination>,
@@ -114,7 +114,7 @@ impl ImagLogger {
})
}
- pub fn global_loglevel(&self) -> LogLevel {
+ pub fn global_loglevel(&self) -> Level {
self.global_loglevel
}
@@ -122,12 +122,16 @@ impl ImagLogger {
impl Log for ImagLogger {
- fn enabled(&self, metadata: &LogMetadata) -> bool {
+ fn enabled(&self, metadata: &Metadata) -> bool {
metadata.level() <= self.global_loglevel
}
- fn log(&self, record: &LogRecord) {
- if record.location().module_path().starts_with("handlebars") {
+ fn flush(&self) {
+ // nothing?
+ }
+
+ fn log(&self, record: &Record) {
+ if record.module_path().map(|m| m.starts_with("handlebars")).unwrap_or(false) {
// This is a ugly, yet necessary hack. When logging, we use handlebars for templating.
// But as the handlebars library itselfs logs via a normal logging macro ("debug!()"),
// we have a recursion in our chain.
@@ -143,9 +147,9 @@ impl Log for ImagLogger {
{
data.insert("level", format!("{}", record.level()));
- data.insert("module_path", String::from(record.location().module_path()));
- data.insert("file", String::from(record.location().file()));
- data.insert("line", format!("{}", record.location().line()));
+ data.insert("module_path", String::from(record.module_path().unwrap_or("<modulepath unknown>")));
+ data.insert("file", String::from(record.file().unwrap_or("<file unknown>")));
+ data.insert("line", format!("{}", record.line().unwrap_or(0)));
data.insert("target", String::from(record.target()));
data.insert("message", format!("{}", record.args()));
}
@@ -209,27 +213,26 @@ impl Log for ImagLogger {
}
}
-fn match_log_level_str(s: &str) -> Result<LogLevel> {
+fn match_log_level_str(s: &str) -> Result<Level> {
match s {
- "trace" => Ok(LogLevel::Trace),
- "debug" => Ok(LogLevel::Debug),
- "info" => Ok(LogLevel::Info),
- "warn" => Ok(LogLevel::Warn),
- "error" => Ok(LogLevel::Error),
+ "trace" => Ok(Level::Trace),
+ "debug" => Ok(Level::Debug),
+ "info" => Ok(Level::Info),
+ "warn" => Ok(Level::Warn),
+ "error" => Ok(Level::Error),
_ => return Err(RE::from_kind(EK::InvalidLogLevelSpec)),
}
}
-fn aggregate_global_loglevel(matches: &ArgMatches, config: Option<&Value>)
- -> Result<LogLevel>
+fn aggregate_global_loglevel(matches: &ArgMatches, config: Option<&Value>) -> Result<Level>
{
- fn get_arg_loglevel(matches: &ArgMatches) -> Result<Option<LogLevel>> {
+ fn get_arg_loglevel(matches: &ArgMatches) -> Result<Option<Level>> {
if matches.is_present(Runtime::arg_debugging_name()) {
- return Ok(Some(LogLevel::Debug))
+ return Ok(Some(Level::Debug))
}
if matches.is_present(Runtime::arg_verbosity_name()) {
- return Ok(Some(LogLevel::Info))
+ return Ok(Some(Level::Info))
}
match matches.value_of(Runtime::arg_verbosity_name()) {
@@ -253,7 +256,7 @@ fn aggregate_global_loglevel(matches: &ArgMatches, config: Option<&Value>)
Ok(cfg_loglevel)
} else {
- get_arg_loglevel(matches).map(|o| o.unwrap_or(LogLevel::Info))
+ get_arg_loglevel(matches).map(|o| o.unwrap_or(Level::Info))
}
}
diff --git a/lib/core/libimagrt/src/runtime.rs b/lib/core/libimagrt/src/runtime.rs
index 9f46feb..9f26df3 100644
--- a/lib/core/libimagrt/src/runtime.rs
+++ b/lib/core/libimagrt/src/runtime.rs
@@ -26,7 +26,6 @@ pub use clap::App;
use toml::Value;
use clap::{Arg, ArgMatches};
-use log;
use configuration::{fetch_config, override_config, InternalConfiguration};
use error::RuntimeError;
@@ -335,22 +334,25 @@ impl<'a> Runtime<'a> {
/// Initialize the internal logger
fn init_logger(matches: &ArgMatches, config: Option<&Value>) {
+ use log::set_max_level;
+ use log::set_boxed_logger;
use std::env::var as env_var;
use env_logger;
if env_var("IMAG_LOG_ENV").is_ok() {
- env_logger::init().unwrap();
+ let _ = env_logger::try_init();
} else {
- log::set_logger(|max_log_lvl| {
- let logger = ImagLogger::new(matches, config)
- .map_err_trace()
- .unwrap_or_else(|_| exit(1));
- max_log_lvl.set(logger.global_loglevel().to_log_level_filter());
- debug!("Init logger with {}", logger.global_loglevel());
- Box::new(logger)
- })
- .map_err(|e| panic!("Could not setup logger: {:?}", e))
- .ok();
+ let logger = ImagLogger::new(matches, config)
+ .map_err_trace()
+ .unwrap_or_else(|_| exit(1));
+
+ set_max_level(logger.global_loglevel().to_level_filter());
+
+ debug!("Init logger with {}", logger.global_loglevel());
+
+ set_boxed_logger(Box::new(logger))
+ .map_err(|e| panic!("Could not setup logger: {:?}", e))
+ .ok();
}
}
diff --git a/lib/core/libimagstore/Cargo.toml b/lib/core/libimagstore/Cargo.toml
index 9ed1dee..985153f 100644
--- a/lib/core/libimagstore/Cargo.toml
+++ b/lib/core/libimagstore/Cargo.toml
@@ -22,7 +22,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
glob = "0.2.11"
lazy_static = "0.2"
-log = "0.3"
+log = "0.4.0"
regex = "0.2"
semver = "0.8"
toml = "0.4"
@@ -39,7 +39,7 @@ libimagutil = { version = "0.6.0", path = "../../../lib/etc/libimagutil" }
[dev-dependencies]
tempdir = "0.3"
-env_logger = "0.4"
+env_logger = "0.5"
[features]
default = []
diff --git a/lib/domain/libimagdiary/Cargo.toml b/lib/domain/libimagdiary/Cargo.toml
index debcd56..543c7f2 100644
--- a/lib/domain/libimagdiary/Cargo.toml
+++ b/lib/domain/libimagdiary/Cargo.toml
@@ -21,7 +21,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
chrono = "0.4"
-log = "0.3"
+log = "0.4.0"
toml = "0.4"
toml-query = "0.6"
itertools = "0.7"
diff --git a/lib/domain/libimagmail/Cargo.toml b/lib/domain/libimagmail/Cargo.toml
index 1f00f56..634d1cf 100644
--- a/lib/domain/libimagmail/Cargo.toml
+++ b/lib/domain/libimagmail/Cargo.toml
@@ -20,7 +20,7 @@ is-it-maintained-open-issues = { repository = "matthiasbeyer/imag" }
maintenance = { status = "actively-developed" }
[dependencies]
-log = "0.3"
+log = "0.4.0"
email = "0.0.17"
filters = "0.2"
error-chain = "0.11"
diff --git a/lib/domain/libimagnotes/Cargo.toml b/lib/domain/libimagnotes/Cargo.toml
index e97c2e8..c092dd5 100644
--- a/lib/domain/libimagnotes/Cargo.toml
+++ b/lib/domain/libimagnotes/Cargo.toml
@@ -20,7 +20,7 @@ is-it-maintained-open-issues = { repository = "matthiasbeyer/imag" }
maintenance = { status = "actively-developed" }
[dependencies]
-log = "0.3"
+log = "0.4.0"
toml = "0.4"
toml-query = "0.6"
error-chain = "0.11"
diff --git a/lib/domain/libimagtodo/Cargo.toml b/lib/domain/libimagtodo/Cargo.toml
index fdcc027..52df955 100644
--- a/lib/domain/libimagtodo/Cargo.toml
+++ b/lib/domain/libimagtodo/Cargo.toml
@@ -24,7 +24,7 @@ task-hookrs = "0.4"
uuid = "0.5"
toml = "0.4"
toml-query = "0.6"
-log = "0.3"
+log = "0.4.0"
serde_json = "1"
error-chain = "0.11"
diff --git a/lib/entry/libimagentrycategory/Cargo.toml b/lib/entry/libimagentrycategory/Cargo.toml
index 5268d92..f98e435 100644
--- a/lib/entry/libimagentrycategory/Cargo.toml
+++ b/lib/entry/libimagentrycategory/Cargo.toml
@@ -20,7 +20,7 @@ is-it-maintained-open-issues = { repository = "matthiasbeyer/imag" }
maintenance = { status = "actively-developed" }
[dependencies]
-log = "0.3"
+log = "0.4.0"
toml = "0.4"
toml-query = "0.6"
is-match = "0.1"
@@ -30,5 +30,5 @@ libimagerror = { version = "0.6.0", path = "../../../lib/core/libimagerror" }
libimagstore = { version = "0.6.0", path = "../../../lib/core/libimagstore" }
[dev-dependencies]
-env_logger = "0.4"
+env_logger = "0.5"
diff --git a/lib/entry/libimagentrycategory/src/register.rs b/lib/entry/libimagentrycategory/src/register.rs
index 2da6272..4d21c37 100644
--- a/lib/entry/libimagentrycategory/src/register.rs
+++ b/lib/entry/libimagentrycategory/src/register.rs
@@ -175,7 +175,7 @@ mod tests {
#[test]
fn test_creating_category_creates_store_entry_with_header_field_set() {
- let _ = env_logger::init();
+ let _ = env_logger::try_init();
let category_name = "examplecategory";
let store = get_store();
let res = store.create_category(category_name);
diff --git a/lib/entry/libimagentryfilter/Cargo.toml b/lib/entry/libimagentryfilter/Cargo.toml
index 6169265..0437a2c 100644
--- a/lib/entry/libimagentryfilter/Cargo.toml
+++ b/lib/entry/libimagentryfilter/Cargo.toml
@@ -23,7 +23,7 @@ maintenance = { status = "actively-developed" }
clap = ">=2.17"
filters = "0.2"
itertools = "0.7"
-log = "0.3"
+log = "0.4.0"
regex = "0.2"
semver = "0.8"
toml = "0.4"
diff --git a/lib/entry/libimagentrygps/Cargo.toml b/lib/entry/libimagentrygps/Cargo.toml
index 0ad1fa9..7f18b00 100644
--- a/lib/entry/libimagentrygps/Cargo.toml
+++ b/lib/entry/libimagentrygps/Cargo.toml
@@ -26,5 +26,5 @@ libimagstore = { version = "0.6.0", path = "../../../lib/core/libimagstore" }
libimagerror = { version = "0.6.0", path = "../../../lib/core/libimagerror" }
[dev-dependencies]
-env_logger = "0.4"
+env_logger = "0.5"
diff --git a/lib/entry/libimagentrygps/src/entry.rs b/lib/entry/libimagentrygps/src/entry.rs
index 641fefd..b56e644 100644
--- a/lib/entry/libimagentrygps/src/entry.rs
+++ b/lib/entry/libimagentrygps/src/entry.rs
@@ -108,8 +108,7 @@ mod tests {
use entry::*;
fn setup_logging() {
- use env_logger;
- let _ = env_logger::init().unwrap_or(());
+ let _ = ::env_logger::try_init;
}
fn get_store() -> Store {
diff --git a/lib/entry/libimagentrylink/Cargo.toml b/lib/entry/libimagentrylink/Cargo.toml
index 7a9e150..af41543 100644
--- a/lib/entry/libimagentrylink/Cargo.toml
+++ b/lib/entry/libimagentrylink/Cargo.toml
@@ -21,7 +21,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
itertools = "0.7"
-log = "0.3"
+log = "0.4.0"
toml = "0.4"
url = "1.5"
rust-crypto = "0.2"
@@ -34,5 +34,5 @@ libimagerror = { version = "0.6.0", path = "../../../lib/core/libimagerror" }
libimagutil = { version = "0.6.0", path = "../../../lib/etc/libimagutil" }
[dev-dependencies]
-env_logger = "0.4"
+env_logger = "0.5"
diff --git a/lib/entry/libimagentrylink/src/external.rs b/lib/entry/libimagentrylink/src/external.rs
index a66ba5b..3e41979 100644
--- a/lib/entry/libimagentrylink/src/external.rs
+++ b/lib/entry/libimagentrylink/src/external.rs
@@ -411,7 +411,7 @@ mod tests {
fn setup_logging() {
use env_logger;
- let _ = env_logger::init().unwrap_or(());
+ let _ = env_logger::try_init();
}
pub fn get_store() -> Store {
diff --git a/lib/entry/libimagentrylink/src/internal.rs b/lib/entry/libimagentrylink/src/internal.rs
index 47291d2..dec86c1 100644
--- a/lib/entry/libimagentrylink/src/internal.rs
+++ b/lib/entry/libimagentrylink/src/internal.rs
@@ -767,8 +767,7 @@ mod test {
use super::Link;
fn setup_logging() {
- use env_logger;
- let _ = env_logger::init().unwrap_or(());
+ let _ = ::env_logger::try_init();
}
pub fn get_store() -> Store {
diff --git a/lib/entry/libimagentrylist/Cargo.toml b/lib/entry/libimagentrylist/Cargo.toml
index 37db3d7..36fdadf 100644
--- a/lib/entry/libimagentrylist/Cargo.toml
+++ b/lib/entry/libimagentrylist/Cargo.toml
@@ -21,7 +21,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
clap = ">=2.17"
-log = "0.3"
+log = "0.4.0"
prettytable-rs = "0.6.*"
error-chain = "0.11"
diff --git a/lib/entry/libimagentrymarkdown/Cargo.toml b/lib/entry/libimagentrymarkdown/Cargo.toml
index 165429b..432c717 100644
--- a/lib/entry/libimagentrymarkdown/Cargo.toml
+++ b/lib/entry/libimagentrymarkdown/Cargo.toml
@@ -20,11 +20,11 @@ is-it-maintained-open-issues = { repository = "matthiasbeyer/imag" }
maintenance = { status = "actively-developed" }
[dependencies]
-log = "0.3"
+log = "0.4.0"
hoedown = "6.0.0"
url = "1.5"
error-chain = "0.11"
-env_logger = "0.4"
+env_logger = "0.5"
libimagstore = { version = "0.6.0", path = "../../../lib/core/libimagstore" }
libimagerror = { version = "0.6.0", path = "../../../lib/core/libimagerror" }
diff --git a/lib/entry/libimagentrymarkdown/src/processor.rs b/lib/entry/libimagentrymarkdown/src/processor.rs
index 6095206..965635c 100644
--- a/lib/entry/libimagentrymarkdown/src/processor.rs
+++ b/lib/entry/libimagentrymarkdown/src/processor.rs
@@ -218,8 +218,7 @@ mod tests {
use libimagentrylink::internal::InternalLinker;
fn setup_logging() {
- use env_logger;
- let _ = env_logger::init().unwrap_or(());
+ let _ = ::env_logger::try_init();
}
pub fn get_store() -> Store {
diff --git a/lib/entry/libimagentryref/Cargo.toml b/lib/entry/libimagentryref/Cargo.toml
index b79f401..abfb12a 100644
--- a/lib/entry/libimagentryref/Cargo.toml
+++ b/lib/entry/libimagentryref/Cargo.toml
@@ -21,7 +21,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
itertools = "0.7"
-log = "0.3"
+log = "0.4.0"
rust-crypto = "0.2"
toml = "0.4"
toml-query = "0.6"
diff --git a/lib/entry/libimagentrytag/Cargo.toml b/lib/entry/libimagentrytag/Cargo.toml
index 1dd7d5a..632a93d 100644
--- a/lib/entry/libimagentrytag/Cargo.toml
+++ b/lib/entry/libimagentrytag/Cargo.toml
@@ -21,7 +21,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
clap = ">=2.17"
-log = "0.3"
+log = "0.4.0"
regex = "0.2"
toml = "0.4"
itertools = "0.7"
diff --git a/lib/entry/libimagentryview/Cargo.toml b/lib/entry/libimagentryview/Cargo.toml
index 22b3b32..33fa5da 100644
--- a/lib/entry/libimagentryview/Cargo.toml
+++ b/lib/entry/libimagentryview/Cargo.toml
@@ -20,7 +20,7 @@ is-it-maintained-open-issues = { repository = "matthiasbeyer/imag" }
maintenance = { status = "actively-developed" }
[dependencies]
-log = "0.3"
+log = "0.4.0"
toml = "0.4"
error-chain = "0.11"
diff --git a/lib/etc/libimaginteraction/Cargo.toml b/lib/etc/libimaginteraction/Cargo.toml
index 534fe29..f603191 100644
--- a/lib/etc/libimaginteraction/Cargo.toml
+++ b/lib/etc/libimaginteraction/Cargo.toml
@@ -24,7 +24,7 @@ ansi_term = "0.10"
clap = ">=2.17"
interactor = "0.1"
lazy_static = "0.2"
-log = "0.3"
+log = "0.4.0"
regex = "0.2"
toml = "0.4"
error-chain = "0.11"
diff --git a/lib/etc/libimagtimeui/Cargo.toml b/lib/etc/libimagtimeui/Cargo.toml
index bf78cfe..46ec5bc 100644
--- a/lib/etc/libimagtimeui/Cargo.toml
+++ b/lib/etc/libimagtimeui/Cargo.toml
@@ -22,7 +22,7 @@ maintenance = { status = "actively-developed" }
[dependencies]
clap = ">=2.17"
lazy_static = "0.2"
-log = "0.3"
+log = "0.4.0"
chrono = "0.4"
regex = "0.2"
diff --git a/lib/etc/libimagutil/Cargo.toml b/lib/etc/libimagutil/Cargo.toml
index bd73ae3..a0d1a70 100644
--- a/lib/etc/libimagutil/Cargo.toml
+++ b/lib/etc/libimagutil/Cargo.toml
@@ -29,7 +29,7 @@ maintenance = { status = "actively-developed" }
url = "1.5"
boolinator = "2.4.0"
lazy_static = "0.2"
-log = "0.3"
+log = "0.4.0"
regex = "0.2"
tempfile = "2.1"