Skip to content

Commit

Permalink
Make log level compilation flag (#109)
Browse files Browse the repository at this point in the history
- debug build will have INFO as default log level
- release build will have WARN as default log level
  • Loading branch information
rajatarya authored Dec 9, 2024
1 parent 2a9af04 commit 43b6bae
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hf_xet/src/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ use utils::ThreadPool;

use crate::log_buffer::{get_telemetry_task, LogBufferLayer, TELEMETRY_PRE_ALLOC_BYTES};

/// Default log level for the library to use. Override using `RUST_LOG` env variable.
#[cfg(not(debug_assertions))]
const DEFAULT_LOG_LEVEL: &str = "warn";

#[cfg(debug_assertions)]
const DEFAULT_LOG_LEVEL: &str = "info";

pub fn initialize_logging(threadpool: Arc<ThreadPool>) {
Expand Down

0 comments on commit 43b6bae

Please sign in to comment.