Skip to content

Commit 81bddc4

Browse files
authored
Fix initializing logging in Python (#110)
1 parent 3a7db22 commit 81bddc4

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

python/src/lib.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use ::hdfs_native::{
88
Client,
99
};
1010
use bytes::Bytes;
11-
use log::LevelFilter;
1211
use pyo3::{exceptions::PyRuntimeError, prelude::*};
1312
use tokio::runtime::Runtime;
1413

@@ -172,9 +171,7 @@ impl RawClient {
172171
#[pyo3(signature = (url))]
173172
pub fn new(url: &str) -> PyResult<Self> {
174173
// Initialize logging, ignore errors if this is called multiple times
175-
let _ = env_logger::Builder::new()
176-
.filter_level(LevelFilter::Off)
177-
.try_init();
174+
let _ = env_logger::try_init();
178175

179176
Ok(RawClient {
180177
inner: Client::new(url).map_err(PythonHdfsError::from)?,

0 commit comments

Comments
 (0)