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

Feat/validators #106

Merged

Conversation

MEHRSHAD-MIRSHEKARY
Copy link
Collaborator

  • Added validate_log_file_format_types: This validator ensures that the LOG_FILE_FORMAT_TYPES setting is a dictionary where keys represent valid log levels and values are valid format types (e.g., JSON, XML).

    • Logs errors if the format type or level is invalid.
    • Provides detailed hints for correcting misconfigurations.
  • Added validate_extra_log_files: This validator checks the EXTRA_LOG_FILES setting to confirm it is a dictionary where keys are valid log levels and values are booleans.

    • Ensures log levels are valid and that the value for each level is either True or False.
  • Error Handling: Each error is clearly identified with a specific error ID (e.g., django_logging.E022_config_name), making it easier to diagnose and fix configuration issues.

  • Improved Reliability: By adding these validators, misconfigurations related to logging formats and extra log files are detected early, ensuring smoother setup and preventing runtime errors.

  • Updatec checks to add new config validators

Closes #105

…ra log files configuration

- **Added �alidate_log_file_format_types:** This validator ensures that the LOG_FILE_FORMAT_TYPES setting is a dictionary where keys represent valid log levels and values are valid format types (e.g., JSON, XML).
  - Logs errors if the format type or level is invalid.
  - Provides detailed hints for correcting misconfigurations.

- **Added �alidate_extra_log_files:** This validator checks the EXTRA_LOG_FILES setting to confirm it is a dictionary where keys are valid log levels and values are booleans.
  - Ensures log levels are valid and that the value for each level is either True or False.

- **Error Handling:** Each error is clearly identified with a specific error ID (e.g., django_logging.E022_config_name), making it easier to diagnose and fix configuration issues.

- **Improved Reliability:** By adding these validators, misconfigurations related to logging formats and extra log files are detected early, ensuring smoother setup and preventing runtime errors.
Copy link
Collaborator

@ARYAN-NIKNEZHAD ARYAN-NIKNEZHAD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved 👌

@ARYAN-NIKNEZHAD ARYAN-NIKNEZHAD merged commit 3d24dc7 into Lazarus-org:main Oct 4, 2024
5 checks passed
@MEHRSHAD-MIRSHEKARY MEHRSHAD-MIRSHEKARY deleted the feat/validators branch October 11, 2024 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration package config enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Checks and Validation for New Configuration Options
2 participants