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

Feature/rflib development mode #97

Merged
merged 4 commits into from
Dec 18, 2024
Merged

Conversation

j-fischer
Copy link
Owner

@j-fischer j-fischer commented Dec 17, 2024

Introduce Development Mode for Internal UI Component Logging in RFLIB


Description

Introducing a new Development Mode feature that adjusts the logging behavior of RFLIB's internal UI components, specifically those used in the Ops Center. The feature is controlled via a new global configuration setting, RFLIB_Development_Mode_Enabled.

Key Changes

  1. Global Configuration Setting:

    • API Name: RFLIB_Development_Mode_Enabled
    • Purpose: Controls the log level of the rflib_LoggerUtil.logInternal() methods.
    • When set to TRUE, log statements in internal UI components will use the INFO level.
    • When set to FALSE, log statements will default to the DEBUG level.
    • Default Value: FALSE
    • Recommended Usage:
      • Enable only during development of new components for RFLIB's Ops Center.
      • Use for debugging UI-related issues in RFLIB.
  2. Updates to rflib_LoggerUtil:

    • Added two new utility methods:
      • logInternal(rflib_Logger logger, String message)
      • logInternal(rflib_Logger logger, String message, Object[] args)
    • These methods dynamically adjust the log level (INFO or DEBUG) based on the RFLIB_Development_Mode_Enabled setting.
  3. Refactoring of Affected Controllers:

    • Updated all log statements of type INFO and DEBUG in the following controllers to use the new logInternal methods:
      • rflib_ApexJobSchedulerController
      • rflib_CustomSettingsEditorController
      • rflib_LogEventViewerController
      • rflib_PermissionsExplorerController
      • rflib_PublicGroupMemberManagerController
      • rflib_UserPermAssignmentController
      • rflib_UserPermSetManagerController
      • rflib_UserProfileResolverController

Why This Feature?

  • Provides better control over logging during development and debugging phases.
  • Reduces unnecessary log noise in production environments while maintaining flexibility for internal debugging.

… type Boolean, which will determine the log level for all log statements in Apex controllers that are associated with UI components in the Ops Center.

For that purpose, a new method called rflib_LoggerUtil.logInternal(logger, level, args) was created.
All unit tests have been updated.
@j-fischer j-fischer added the enhancement New feature or request label Dec 17, 2024
@j-fischer j-fischer added this to the RFLIB 8.0 milestone Dec 17, 2024
@j-fischer j-fischer merged commit 0e11e93 into master Dec 18, 2024
6 checks passed
@j-fischer j-fischer deleted the feature/rflib-development-mode branch December 18, 2024 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant