Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix wrong logging of unhandled params #264

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

tanguyvda
Copy link
Contributor

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

  • Patch fixing an issue (non-breaking change)
  • New functionality (non-breaking change)
  • Breaking change (patch or feature) that might cause side effects breaking part of the Software

Target serie

  • 22.10.x
  • 23.04.x
  • 23.10.x
  • 24.04.x
  • 24.10.x
  • master

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

  • I have followed the coding style guidelines provided by Centreon
  • I have commented my code, especially new classes, functions or any legacy code modified. (docblock)
  • I have commented my code, especially hard-to-understand areas of the PR.
  • I have rebased my development branch on the base branch (master, maintenance).

@tanguyvda tanguyvda requested a review from a team as a code owner February 11, 2025 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant