Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ use io_thread_controller::{
util::Path,
};
use thiserror::Error;
use tracing::instrument;
use tracing_subscriber::fmt::format::FmtSpan;

#[derive(Error, Debug)]
enum IoThreadControllerError {
Expand Down Expand Up @@ -136,6 +138,7 @@ async fn main() -> Result<(), IoThreadControllerError> {
}

/// Load defaults only for an absent file; propagate every other open failure.
#[instrument]
fn load_daemon_config(path: &Path) -> Result<Config, ConfigError> {
match std::fs::File::open(path) {
Ok(_) => load_config(path),
Expand Down Expand Up @@ -179,6 +182,7 @@ fn init_logging(filter: &str, style: LogStyle) {
.with_target(true)
.without_time()
.with_env_filter(env_filter)
.with_span_events(FmtSpan::NEW) // FIXME elsewhere
.finish();
let _ = tracing::subscriber::set_global_default(subscriber);
}
Expand Down
Loading