-
-
Notifications
You must be signed in to change notification settings - Fork 208
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
Check all env vars and suggest alternatives for misspelled keys #1719
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FTLCONF_debug_api is invalid, using default
Would be nice if the log would tell us, why it is invalid. E.g.
FTLCONF_debug_api is invalid (expecting bool, string set), using default
The latest commits change the output to
Furthermore, we extend suggesting mistyped keys to the CLI (
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Conflicts have been resolved. |
4ef87a2
to
3e095da
Compare
Rebased on latest |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Conflicts have been resolved. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Conflicts have been resolved. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
…for typos Signed-off-by: DL6ER <[email protected]>
…ERR" to "ERROR" when printing errors (we also have INFO, WARNING, DEBUG, NOTICE, ALERT, ...) Signed-off-by: DL6ER <[email protected]>
Signed-off-by: DL6ER <[email protected]>
Signed-off-by: DL6ER <[email protected]>
Signed-off-by: DL6ER <[email protected]>
Signed-off-by: DL6ER <[email protected]>
…, e.g. find misc.privacylevel is misc.priv is entered as the Hamming distance to misc.nice is shorter Signed-off-by: DL6ER <[email protected]>
ef41397
to
a92e656
Compare
…during CI testing Signed-off-by: DL6ER <[email protected]>
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Signed-off-by: DL6ER <[email protected]>
Conflicts have been resolved. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Signed-off-by: DL6ER <[email protected]>
Conflicts have been resolved. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Signed-off-by: DL6ER <[email protected]>
Conflicts have been resolved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pihole | 2024-02-10 08:25:00.174 [146M] WARNING: [?] FTLCONF_webserver_aip_passwordddd is unknown, did you mean any of these?
pihole | 2024-02-10 08:25:00.174 [146M] WARNING: - FTLCONF_webserver_api_password
What does this implement/fix?
This PR adds checking for all
FTLCONF_*
environment variables. We log used ones, invalid ones (e.g.123
for something expecting a boolean), and unknown keys (ignored). In the latter case, we try to suggest a meaningful alternative to aid typo fixing.Example environment:
leading to the following log output:
(removed, see updated output in comment below)
When no environment variables are defined, nothing environmental variables-related is logged at all.
Related issue or feature (if applicable): N/A
Pull request in docs with documentation (if applicable): N/A
By submitting this pull request, I confirm the following:
git rebase
)Checklist:
developmental
branch.