refactor: clean up a few things

This commit is contained in:
2025-03-06 20:14:18 -05:00
parent 4d3947c4ef
commit cce75bd8b9
4 changed files with 73 additions and 68 deletions

View File

@@ -76,14 +76,14 @@ async fn main() -> anyhow::Result<()> {
} else {
DefaultPlugins.set(LogPlugin {
custom_layer: |_| {
env::var("LOG_FILE").ok().map(|log_file| {
env::var("LOG_FILE").ok().map(|path| {
layer()
.with_writer(
OpenOptions::new()
.append(true)
.create(true)
.open(&log_file)
.expect(&(log_file + " should be accessible")),
.open(&path)
.expect(&(path + " should be accessible")),
)
.boxed()
})