From 4aae7b02be390c1431a061211c3a355457248074 Mon Sep 17 00:00:00 2001 From: PengZheng Date: Tue, 12 Dec 2023 18:47:48 +0800 Subject: [PATCH] Recover debugging message in `celix_properties_load`, but lower its output level during bundle install. --- libs/framework/src/bundle_archive.c | 2 ++ libs/utils/src/properties.c | 1 + 2 files changed, 3 insertions(+) diff --git a/libs/framework/src/bundle_archive.c b/libs/framework/src/bundle_archive.c index fef98c692..f195d4ef6 100644 --- a/libs/framework/src/bundle_archive.c +++ b/libs/framework/src/bundle_archive.c @@ -32,6 +32,7 @@ #include "celix_file_utils.h" #include "celix_framework_utils_private.h" #include "celix_utils_api.h" +#include "celix_log.h" #include "bundle_archive_private.h" #include "bundle_revision_private.h" @@ -65,6 +66,7 @@ static celix_status_t celix_bundleArchive_storeBundleStateProperties(bundle_arch celix_properties_t* bundleStateProperties = NULL; bundleStateProperties = celix_properties_load(archive->savedBundleStatePropertiesPath); if (bundleStateProperties == NULL) { + celix_framework_logTssErrors(archive->fw->logger, CELIX_LOG_LEVEL_DEBUG); bundleStateProperties = celix_properties_create(); } if (bundleStateProperties == NULL) { diff --git a/libs/utils/src/properties.c b/libs/utils/src/properties.c index 24dcafd5b..8d3a2dfac 100644 --- a/libs/utils/src/properties.c +++ b/libs/utils/src/properties.c @@ -374,6 +374,7 @@ void celix_properties_destroy(celix_properties_t* props) { celix_properties_t* celix_properties_load(const char* filename) { FILE* file = fopen(filename, "r"); if (file == NULL) { + celix_err_pushf("Cannot open file '%s'", filename); return NULL; } celix_properties_t* props = celix_properties_loadWithStream(file);