summaryrefslogtreecommitdiff
path: root/capi
diff options
context:
space:
mode:
Diffstat (limited to 'capi')
-rw-r--r--capi/Cargo.toml1
-rw-r--r--capi/src/lib.rs7
2 files changed, 4 insertions, 4 deletions
diff --git a/capi/Cargo.toml b/capi/Cargo.toml
index 7e70a41..8452aed 100644
--- a/capi/Cargo.toml
+++ b/capi/Cargo.toml
@@ -10,6 +10,7 @@ name = "resvg"
crate-type = ["cdylib"]
[dependencies]
+log = "0.4"
fern = "0.5"
[dependencies.resvg]
diff --git a/capi/src/lib.rs b/capi/src/lib.rs
index e5fbf47..0d5597d 100644
--- a/capi/src/lib.rs
+++ b/capi/src/lib.rs
@@ -3,6 +3,7 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
extern crate resvg;
+extern crate log;
extern crate fern;
#[cfg(feature = "cairo-backend")]
@@ -58,14 +59,12 @@ macro_rules! from_raw_str {
pub extern fn resvg_init_log() {
fern::Dispatch::new()
.format(log_format)
- .level(resvg::log::LevelFilter::Warn)
+ .level(log::LevelFilter::Warn)
.chain(std::io::stderr())
.apply().unwrap();
}
-fn log_format(out: fern::FormatCallback, message: &fmt::Arguments, record: &resvg::log::Record) {
- use resvg::log;
-
+fn log_format(out: fern::FormatCallback, message: &fmt::Arguments, record: &log::Record) {
let lvl = match record.level() {
log::Level::Error => "Error",
log::Level::Warn => "Warning",