fix wrong logging of unhandled params #264
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
when you put an unknown parameter in your stream connector config, it should display in the log file that the parameter is not handled and is going to be ignored. It must clearly display the name of the unknown parameter to help you find out if you've made a typo or something else.
Which is not the case at the moment
Type of change
Target serie
How this pull request can be tested ?
put a random parameter (that doesn't exist) in your stream connector
without the patch you'll have the following result :
Tue Feb 11 10:14:00 2025: INFO: [sc_params:param_override]: User parameter: nil is not handled by this stream connector Tue Feb 11 10:14:00 2025: INFO: [sc_params:param_override]: overriding parameter: user with value: dazdza Tue Feb 11 10:14:00 2025: INFO: [sc_params:param_override]: User parameter: nil is not handled by this stream connector Tue Feb 11 10:14:00 2025: INFO: [sc_params:param_override]: overriding parameter: send_data_test with value: 1 Tue Feb 11 10:14:00 2025: INFO: [sc_params:param_override]: overriding parameter: password with value: ******
with the patch you'll have
Tue Feb 11 11:32:38 2025: INFO: [sc_params:param_override]: User parameter: enable_trace is not handled by this stream connector Tue Feb 11 11:32:38 2025: INFO: [sc_params:param_override]: overriding parameter: send_data_test with value: 1 Tue Feb 11 11:32:38 2025: INFO: [sc_params:param_override]: overriding parameter: user with value: dazdza Tue Feb 11 11:32:38 2025: INFO: [sc_params:param_override]: overriding parameter: use_deprecated_metric_system with value: 1 Tue Feb 11 11:32:38 2025: INFO: [sc_params:param_override]: overriding parameter: password with value: ****** Tue Feb 11 11:32:38 2025: INFO: [sc_params:param_override]: overriding parameter: http_server_url with value: dzadzadza Tue Feb 11 11:32:38 2025: INFO: [sc_params:param_override]: User parameter: trace_host_id_list is not handled by this stream connector
Checklist
Community contributors & Centreon team