Skip to content

Commit 08e5a2d

Browse files
committed
Fix: correctly include/not include logger.
1 parent 5aa9f95 commit 08e5a2d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

server/src/webserver.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1305,6 +1305,11 @@ pub async fn main(
13051305
// called before the server is run.
13061306
pub fn init_server(extension_base_path: Option<&Path>, level: LevelFilter) -> std::io::Result<()> {
13071307
set_root_path(extension_base_path)?;
1308+
// The unit tests include a test logger; don't config the logger in a test
1309+
// build.
1310+
#[cfg(test)]
1311+
let _ = level;
1312+
#[cfg(not(test))]
13081313
configure_logger(level).map_err(|e| std::io::Error::other(e.to_string()))?;
13091314
Ok(())
13101315
}

0 commit comments

Comments
 (0)