diff options
author | Matthias Beyer <matthias.beyer@ifm.com> | 2022-01-19 09:43:39 +0100 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@ifm.com> | 2022-02-14 16:04:54 +0100 |
commit | ed6168434d726eb31819bda50601be2e8227b965 (patch) | |
tree | 5a8f86417a83c6c06352a72e5c4ae64546e75449 | |
parent | 170b5f018ba32890cb00c7a4ec0e3e3cc89130e0 (diff) |
Add error log when config cannot be loaded
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
-rw-r--r-- | Cargo.lock | 1 | ||||
-rw-r--r-- | crates/common/tedge_config/Cargo.toml | 1 | ||||
-rw-r--r-- | crates/common/tedge_config/src/tedge_config_repository.rs | 1 |
3 files changed, 3 insertions, 0 deletions
@@ -2675,6 +2675,7 @@ version = "0.5.2" dependencies = [ "assert_matches", "certificate", + "log", "serde", "tedge_users", "tedge_utils", diff --git a/crates/common/tedge_config/Cargo.toml b/crates/common/tedge_config/Cargo.toml index b6ca71ab..3c71cd78 100644 --- a/crates/common/tedge_config/Cargo.toml +++ b/crates/common/tedge_config/Cargo.toml @@ -14,6 +14,7 @@ tempfile = "3.2" thiserror = "1.0" toml = "0.5" url = "2.2" +log = "0.4" [dev-dependencies] assert_matches = "1.5" diff --git a/crates/common/tedge_config/src/tedge_config_repository.rs b/crates/common/tedge_config/src/tedge_config_repository.rs index a7741165..44e503d7 100644 --- a/crates/common/tedge_config/src/tedge_config_repository.rs +++ b/crates/common/tedge_config/src/tedge_config_repository.rs @@ -77,6 +77,7 @@ impl TEdgeConfigRepository { self.make_tedge_config(data) } Err(err) if err.kind() == std::io::ErrorKind::NotFound => { + log::error!("Configuration file {} not found", path.display()); Err(TEdgeConfigError::ConfigFileNotFound(path)) } Err(err) => Err(TEdgeConfigError::FromIo(err)), |