From 53fdfcfa28c569b53c8c3dba0b0606882ea9b99b Mon Sep 17 00:00:00 2001 From: Vivek Kumar Dutta <vivek.dutta@iopsys.eu> Date: Sun, 16 Mar 2025 11:45:38 +0530 Subject: [PATCH] Updated logs --- bbfdmd/ubus/bbfdmd.c | 4 ++-- bbfdmd/ubus/service.c | 2 +- dm-service/dm_service.c | 2 +- libbbfdm-api/legacy/dmubus.c | 6 +++--- libbbfdm-api/legacy/plugin/dotso_plugin.c | 2 -- libbbfdm-api/version-2/bbfdm_ubus.c | 4 ++-- 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/bbfdmd/ubus/bbfdmd.c b/bbfdmd/ubus/bbfdmd.c index 455f19a9f..ed7e7712b 100644 --- a/bbfdmd/ubus/bbfdmd.c +++ b/bbfdmd/ubus/bbfdmd.c @@ -207,7 +207,7 @@ int main(int argc, char **argv) if (optarg) { g_log_level = (int)strtod(optarg, NULL); if (g_log_level < 0 || g_log_level > 7) - g_log_level = 3; + g_log_level = 7; } break; case 'h': @@ -251,7 +251,7 @@ int main(int argc, char **argv) uloop_run(); end: - BBFDM_ERR("Free context"); + BBFDM_DEBUG("BBFDMD exits"); unregister_services(); uloop_done(); ubus_shutdown(&ubus_ctx); diff --git a/bbfdmd/ubus/service.c b/bbfdmd/ubus/service.c index 2a2b5e7d9..2d21714da 100644 --- a/bbfdmd/ubus/service.c +++ b/bbfdmd/ubus/service.c @@ -80,7 +80,7 @@ static int load_service_from_file(struct ubus_context *ubus_ctx, const char *fil uint32_t ubus_id; if (ubus_lookup_id(ubus_ctx, service_name, &ubus_id)) { - BBFDM_ERR("Failed to lookup UBUS object: %s", service_name); + BBFDM_WARNING("Failed to lookup UBUS object: %s", service_name); } json_object *unified_daemon_jobj = NULL; diff --git a/dm-service/dm_service.c b/dm-service/dm_service.c index edbfaa4e4..d4fbd97fd 100644 --- a/dm-service/dm_service.c +++ b/dm-service/dm_service.c @@ -42,7 +42,7 @@ int main(int argc, char **argv) if (optarg) { log_level = (int)strtod(optarg, NULL); if (log_level < 0 || log_level > 7) - log_level = 3; + log_level = 7; } break; case 'h': diff --git a/libbbfdm-api/legacy/dmubus.c b/libbbfdm-api/legacy/dmubus.c index 47dfae1fd..541e3304e 100644 --- a/libbbfdm-api/legacy/dmubus.c +++ b/libbbfdm-api/legacy/dmubus.c @@ -95,7 +95,7 @@ static int __dm_ubus_call_internal(const char *obj, const char *method, int time } if (ubus_lookup_id(ubus_ctx, obj, &id)) { - BBF_ERR("Failed to lookup UBUS object ID for '%s' using method '%s'", obj, method); + BBF_WARNING("Failed to lookup UBUS object ID for '%s' using method '%s'", obj, method); return -1; } @@ -331,7 +331,7 @@ static int dmubus_call_blob_internal(const char *obj, const char *method, json_o } if (ubus_lookup_id(ubus_ctx, obj, &id)) { - BBF_ERR("Failed to lookup UBUS object ID for '%s' using method '%s'", obj, method); + BBF_WARNING("Failed to lookup UBUS object ID for '%s' using method '%s'", obj, method); blob_buf_free(&blob); return rc; } @@ -381,7 +381,7 @@ static int dmubus_call_blob_msg_internal(const char *obj, const char *method, st } if (ubus_lookup_id(ubus_ctx, obj, &id)) { - BBF_ERR("Failed to lookup UBUS object ID for '%s' using method '%s'", obj, method); + BBF_WARNING("Failed to lookup UBUS object ID for '%s' using method '%s'", obj, method); return -1; } diff --git a/libbbfdm-api/legacy/plugin/dotso_plugin.c b/libbbfdm-api/legacy/plugin/dotso_plugin.c index 776ee9d85..f42f75190 100644 --- a/libbbfdm-api/legacy/plugin/dotso_plugin.c +++ b/libbbfdm-api/legacy/plugin/dotso_plugin.c @@ -69,7 +69,6 @@ int load_dotso_plugins(DMOBJ *entryobj, const char *plugin_path) #endif if (!handle) { char *err_msg = dlerror(); - TRACE_FILE("Failed to add DotSo plugin '%s', [%s]\n", plugin_path, err_msg); BBF_ERR("Failed to add DotSo plugin '%s', [%s]\n", plugin_path, err_msg); return 0; } @@ -88,7 +87,6 @@ int load_dotso_plugins(DMOBJ *entryobj, const char *plugin_path) DMOBJ *dm_entryobj = find_entry_obj(entryobj, dynamic_obj[i].path); if (!dm_entryobj) { - TRACE_FILE("Failed to add DotSo plugin '%s' to main tree with parent DM index '%d' => '%s'", plugin_path, i, dynamic_obj[i].path); BBF_ERR("Failed to add DotSo plugin '%s' to main tree with parent DM index '%d' => '%s'", plugin_path, i, dynamic_obj[i].path); continue; } diff --git a/libbbfdm-api/version-2/bbfdm_ubus.c b/libbbfdm-api/version-2/bbfdm_ubus.c index eff8b0224..9a4f8e851 100644 --- a/libbbfdm-api/version-2/bbfdm_ubus.c +++ b/libbbfdm-api/version-2/bbfdm_ubus.c @@ -42,7 +42,7 @@ int bbfdm_ubus_invoke_sync(struct bbfdm_ctx *bbfdm_ctx, const char *obj, const c } if (ubus_lookup_id(bbfdm_ctx->ubus_ctx, obj, &id)) { - BBFDM_ERR("Failed to lookup UBUS object ID for '%s' using method '%s'", obj, method); + BBFDM_WARNING("Failed to lookup UBUS object ID for '%s' using method '%s'", obj, method); return -1; } @@ -67,7 +67,7 @@ int bbfdm_ubus_invoke_async(struct ubus_context *ubus_ctx, const char *obj, cons } if (ubus_lookup_id(ubus_ctx, obj, &id)) { - BBFDM_ERR("Failed to lookup UBUS object ID for '%s' using method '%s'", obj, method); + BBFDM_WARNING("Failed to lookup UBUS object ID for '%s' using method '%s'", obj, method); return -1; } -- GitLab