Allow logging to be disabled
This is a somewhat nontraditioonal use of features, but I don't want to make logging opt in. Closes #215
This commit is contained in:
parent
a624abc557
commit
d99843ba91
@ -31,6 +31,8 @@ with-serde_json = ["serde_json"]
|
||||
with-time = ["time"]
|
||||
with-uuid = ["uuid"]
|
||||
|
||||
no-logging = []
|
||||
|
||||
[dependencies]
|
||||
bufstream = "0.1"
|
||||
fallible-iterator = "0.1.3"
|
||||
|
@ -73,6 +73,7 @@
|
||||
extern crate bufstream;
|
||||
extern crate fallible_iterator;
|
||||
extern crate hex;
|
||||
#[cfg(not(feature = "no-logging"))]
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
extern crate phf;
|
||||
|
@ -25,3 +25,13 @@ macro_rules! bad_response {
|
||||
return Err(::error::Error::Io(::bad_response()));
|
||||
})
|
||||
}
|
||||
|
||||
#[cfg(feature = "no-logging")]
|
||||
macro_rules! debug {
|
||||
($($t:tt)*) => {}
|
||||
}
|
||||
|
||||
#[cfg(feature = "no-logging")]
|
||||
macro_rules! info {
|
||||
($($t:tt)*) => {}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user