mirror of
https://github.com/rustic-rs/rustic.git
synced 2025-10-26 11:18:51 +00:00
fix: show log filename if open/creation failed (#1111)
If opening or creating the logfile fails, rustic now shows the filename to allow users debug the error. closes #1105
This commit is contained in:
parent
07f92d882e
commit
0f3cc39264
@ -244,7 +244,16 @@ impl Configurable<RusticConfig> for EntryPoint {
|
||||
WriteLogger::new(
|
||||
level_filter,
|
||||
simplelog::Config::default(),
|
||||
File::options().create(true).append(true).open(file)?,
|
||||
File::options()
|
||||
.create(true)
|
||||
.append(true)
|
||||
.open(file)
|
||||
.map_err(|e| {
|
||||
FrameworkErrorKind::PathError {
|
||||
name: Some(file.clone()),
|
||||
}
|
||||
.context(e)
|
||||
})?,
|
||||
),
|
||||
])
|
||||
.map_err(|e| FrameworkErrorKind::ConfigError.context(e))?,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user