Fix typo in log message and remove prefixed '_' from a few used variables

This commit is contained in:
Imbris 2021-07-30 22:10:12 -04:00
parent 680492cea6
commit 119c72f5d8
2 changed files with 10 additions and 8 deletions

View File

@ -39,7 +39,10 @@ where
{
// To hold the guards that we create, they will cause the logs to be
// flushed when they're dropped.
let mut _guards: Vec<WorkerGuard> = vec![];
#[cfg(not(feature = "tracy"))]
let mut guards: Vec<WorkerGuard> = Vec::new();
#[cfg(feature = "tracy")]
let guards: Vec<WorkerGuard> = Vec::new();
// We will do lower logging than the default (INFO) by INCLUSION. This
// means that if you need lower level logging for a specific module, then
@ -100,8 +103,8 @@ where
let registry = registry.with(tracing_tracy::TracyLayer::new().with_stackdepth(0));
#[cfg(not(feature = "tracy"))]
let registry = {
let (non_blocking, _stdio_guard) = tracing_appender::non_blocking(terminal.make_writer());
_guards.push(_stdio_guard);
let (non_blocking, stdio_guard) = tracing_appender::non_blocking(terminal.make_writer());
guards.push(stdio_guard);
registry.with(tracing_subscriber::fmt::layer().with_writer(non_blocking))
};
@ -111,9 +114,8 @@ where
match fs::create_dir_all(path) {
Ok(_) => {
let file_appender = tracing_appender::rolling::daily(path, file);
let (non_blocking_file, _file_guard) =
tracing_appender::non_blocking(file_appender);
_guards.push(_file_guard);
let (non_blocking_file, file_guard) = tracing_appender::non_blocking(file_appender);
guards.push(file_guard);
file_setup = true;
registry
.with(tracing_subscriber::fmt::layer().with_writer(non_blocking_file))
@ -146,7 +148,7 @@ where
};
// Return the guards
_guards
guards
}
pub fn init_stdout(log_path_file: Option<(&Path, &str)>) -> Vec<impl Drop> {

View File

@ -173,7 +173,7 @@ impl Server {
data_dir: &std::path::Path,
runtime: Arc<Runtime>,
) -> Result<Self, Error> {
info!("Server is data dir is: {}", data_dir.display());
info!("Server data dir is: {}", data_dir.display());
if settings.auth_server_address.is_none() {
info!("Authentication is disabled");
}