When specifying the `--debug` flag on the commandline, logging was not
enabled. That was because the config file parsing did not consider the
args.
Now, if `--debug` is passed on the CLI, logging is enabled for all
modules and level is set to `debug` for all modules.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
for safely creating a `String` object from `StoreId` which can be shown
to the user.
Mainly introduced because this is useful for error handling (when
putting a `StoreId` into an error kind, the compiler complains that
`StoreId` does not meet the required trait bounds. But `String` does and
we do not process the ID any further anyways).
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
The implementation of the in-memory filesystem for testing imag code did
not actually use `HashMap::remove()` when an entry was moved, but
`HashMap::get().cloned()`, which caused the original entry to exist
_after_ the move.
I'm not sure why this did not fail much earlier, but it was clearly
wrong. This commit adjust the test to check the "filesystem" before
checking the store and fixes the bug.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This actually caused tests to fail if there was indeed a file at
/tmp/store/test and the test tried to create a "test" entry in the store.
Do use backend instead to check whether entry actually exists.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
The issue was that the handlebars implementation logs as well and if we
use handlebars in the logger implementation that causes recursion which
crashes the program.
With handlebars 1.0.5, there is a feature[0] to disable logging in
handlebars (compiletime) which we use with this patch. The
exception-checking in the log implementation can be removed therefore.
[0]: https://github.com/sunng87/handlebars-rust/pull/236#issuecomment-427014611
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This reverts commit a1f0872486995b80216e8a08a2176debdef3752a.
As updating handlebars needs some more involvement, we roll back to the
version we use currently and schedule the update for later.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>