Skip to content

Commit 6aa983a

Browse files
sophokles73SebastianSchildt
authored andcommitted
[#6] Remove env_logger crate
Given that this is a library crate, it should be left to the user, if and how logging should be done.
1 parent f596032 commit 6aa983a

File tree

4 files changed

+1
-142
lines changed

4 files changed

+1
-142
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ databroker-cli/thirdparty
77
.venv/
88
allure-results/
99
.pytest_cache/
10+
.vscode/

Cargo.lock

Lines changed: 0 additions & 131 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

kuksa-rust-sdk/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ repository = "https://github.com/eclipse-kuksa/kuksa-rust-sdk"
1010
readme = "../README.md"
1111

1212
[dependencies]
13-
env_logger = "0.11"
1413
futures-core = "0.3.31"
1514
http = "0.2.8"
1615
log = "0.4"

kuksa-rust-sdk/src/kuksa/common/mod.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,9 @@ use crate::proto::kuksa::val::v1::Error;
2020
use http::Uri;
2121
use log::info;
2222
use std::convert::TryFrom;
23-
use std::sync::Once;
2423
use tokio_stream::wrappers::BroadcastStream;
2524
use tonic::{async_trait, transport::Channel};
2625

27-
static INIT: Once = Once::new();
28-
2926
#[derive(Debug)]
3027
pub struct Client {
3128
uri: Uri,
@@ -316,15 +313,8 @@ pub fn to_uri(uri: impl AsRef<str>) -> Result<Uri, String> {
316313
tonic::transport::Uri::from_parts(parts).map_err(|err| format!("{err}"))
317314
}
318315

319-
fn init_logger() {
320-
INIT.call_once(|| {
321-
env_logger::init();
322-
});
323-
}
324-
325316
impl Client {
326317
pub fn new(uri: Uri) -> Self {
327-
init_logger();
328318
info!("Creating client with URI: {}", uri);
329319
Client {
330320
uri,

0 commit comments

Comments
 (0)