diff options
author | Loïc Collignon <loic.collignon@iot.bzh> | 2018-08-31 08:29:48 +0200 |
---|---|---|
committer | Loïc Collignon <loic.collignon@iot.bzh> | 2018-08-31 08:29:48 +0200 |
commit | 9a2509a3830c6ca481c56c626a2d016750bb1c0f (patch) | |
tree | 409f5e1ebde8b3e5d10a01f9fc58c9403d14353d /ahl-binding/ahl-binding.cpp | |
parent | 11d2ae972c434453f09a7ffe66a8c202efbce2a5 (diff) |
Lower verbosity
Reduced the verbosity by using more approriate log level. All message
can still be seen by increasing the verbosity of the service.
Bug: SPEC-1688
Change-Id: I584ef1a594536eb91b9c4d74885192763a85bdcf
Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
Diffstat (limited to 'ahl-binding/ahl-binding.cpp')
-rw-r--r-- | ahl-binding/ahl-binding.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ahl-binding/ahl-binding.cpp b/ahl-binding/ahl-binding.cpp index 8ac5b22..79cf7b2 100644 --- a/ahl-binding/ahl-binding.cpp +++ b/ahl-binding/ahl-binding.cpp @@ -93,7 +93,7 @@ void ahl_api_get_roles(afb_request* req) /** * @brief Callback invoked when clients call a 'role' verb. * @param[in] req Request to handle. - * + * * Handle dynamic verbs based on role name ('multimedia', 'navigation', ...) */ void ahl_api_role(afb_request* req) @@ -157,14 +157,14 @@ int ahl_binding_t::preinit(afb_dynapi* handle) int ahl_binding_t::init() { using namespace std::placeholders; - + if (afb_dynapi_require_api(handle_, HAL_MGR_API, 1)) { AFB_DYNAPI_ERROR(handle_, "Failed to require '%s' API!", HAL_MGR_API); return -1; } AFB_DYNAPI_NOTICE(handle_, "Required '%s' API found!", HAL_MGR_API); - + if (afb_dynapi_require_api(handle_, "smixer", 1)) { AFB_DYNAPI_ERROR(handle_, "Failed to require 'smixer' API!"); @@ -175,7 +175,7 @@ int ahl_binding_t::init() afb_dynapi_seal(handle_); AFB_DYNAPI_NOTICE(handle_, "API is now sealed!"); - if (update_streams()) return -1; + if (update_streams()) return -1; return 0; } @@ -192,7 +192,7 @@ int ahl_binding_t::update_streams() if (afb_dynapi_call_sync(handle_, "4a-hal-manager", "loaded", json_object_new_object(), &loaded)) { AFB_DYNAPI_ERROR(handle_, "Failed to call 'loaded' verb on '4a-hal-manager' API!"); - if (loaded) AFB_DYNAPI_NOTICE(handle_, "%s", json_object_to_json_string(loaded)); + if (loaded) AFB_DYNAPI_ERROR(handle_, "%s", json_object_to_json_string(loaded)); return -1; } json_bool ret = json_object_object_get_ex(loaded, "response", &response); @@ -213,7 +213,7 @@ int ahl_binding_t::update_streams() if (afb_dynapi_call_sync(handle_, halname, "info", json_object_new_object(), &info)) { AFB_DYNAPI_ERROR(handle_, "Failed to call 'info' verb on '%s' API!", halname); - if (info) AFB_DYNAPI_NOTICE(handle_, "%s", json_object_to_json_string(info)); + if (info) AFB_DYNAPI_ERROR(handle_, "%s", json_object_to_json_string(info)); return -1; } @@ -238,7 +238,7 @@ int ahl_binding_t::update_streams() ); } - json_object_put(info); + json_object_put(info); } json_object_put(loaded); @@ -324,7 +324,7 @@ int ahl_binding_t::load_controller_config(const std::string& path) AFB_DYNAPI_ERROR(handle_, "Failed to load controller from config file!"); return -1; } - + static CtlSectionT controller_sections[] = { {.key = "plugins", .uid = nullptr, .info = nullptr, .loadCB = PluginConfig, .handle = nullptr, .actions = nullptr}, @@ -346,7 +346,7 @@ int ahl_binding_t::parse_roles_config(json_object* o) assert(json_object_is_type(o, json_type_array)); if (roles_.size()) return 0; // Roles already added, ignore. - + size_t count = json_object_array_length(o); roles_.reserve(count); for(int i = 0; i < count; ++i) |