Skip to content

Commit 5280013

Browse files
committed
Remove logger initialization and env_logger dependency
1 parent 455e6b8 commit 5280013

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

tokio-postgres/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ tokio-util = { version = "0.7", features = ["codec"] }
6363
rand = "0.8.5"
6464
whoami = "1.4.1"
6565
lazy_static = "1.4.0"
66-
env_logger = "0.10.0"
6766

6867
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
6968
socket2 = { version = "0.5", features = ["all"] }

tokio-postgres/src/config.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use crate::tls::TlsConnect;
1212
#[cfg(feature = "runtime")]
1313
use crate::Socket;
1414
use crate::{Client, Connection, Error};
15-
use env_logger::{Builder, Target};
1615
use std::borrow::Cow;
1716
use std::collections::HashMap;
1817
#[cfg(unix)]
@@ -25,22 +24,10 @@ use std::os::unix::ffi::OsStrExt;
2524
use std::path::{Path, PathBuf};
2625
use std::str;
2726
use std::str::FromStr;
28-
use std::sync::Once;
2927
use std::time::Duration;
3028
use std::{error, fmt, iter, mem};
3129
use tokio::io::{AsyncRead, AsyncWrite};
3230

33-
static INIT: Once = Once::new();
34-
35-
fn logger_setup() {
36-
let mut builder = Builder::from_default_env();
37-
builder.target(Target::Stdout);
38-
39-
INIT.call_once(|| {
40-
builder.init();
41-
});
42-
}
43-
4431
/// Properties required of a session.
4532
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
4633
#[non_exhaustive]
@@ -895,7 +882,6 @@ impl Config {
895882
T: MakeTlsConnect<Socket>,
896883
{
897884
if self.load_balance == true {
898-
logger_setup();
899885
yb_connect(tls, self).await
900886
} else {
901887
connect(tls, self).await

0 commit comments

Comments
 (0)