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: centralize configuration logging #501

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

mattp-swirldslabs
Copy link
Contributor

@mattp-swirldslabs mattp-swirldslabs commented Jan 15, 2025

Description:

  • Centralized the logging of configuration properties in the ConfigurationLoggingImpl class
  • Added @Loggable annotation to allow developers to indicate a field can be logged normally
  • Fields without @Loggable are safe by default. The property name will be displayed but the value will always be the same "*****" e.g. my.property=*****
  • Converted Config records using "NOOP" string to an enum
  • Replaced VerificationConfig enabled with an enum
  • Removed log output from other Config records
  • Added a commented out property in logging.properties showing how to switch OFF the output

Related issue(s):

Fixes #471
Fixes #474

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@mattp-swirldslabs mattp-swirldslabs added Feature Enhancement Enhancing an existing feature driven by business requirements. Typically backwards compatible. Block Node Issues/PR related to the Block Node. labels Jan 15, 2025
@mattp-swirldslabs mattp-swirldslabs added this to the 0.3.0 milestone Jan 15, 2025
@mattp-swirldslabs mattp-swirldslabs self-assigned this Jan 15, 2025
@mattp-swirldslabs mattp-swirldslabs marked this pull request as ready for review January 15, 2025 23:31
@mattp-swirldslabs mattp-swirldslabs requested a review from a team as a code owner January 15, 2025 23:31
AlfredoG87
AlfredoG87 previously approved these changes Jan 15, 2025
Copy link
Contributor

@AlfredoG87 AlfredoG87 left a comment

Choose a reason for hiding this comment

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

LGTM, nice work.

@AlfredoG87
Copy link
Contributor

@mattp-swirldslabs, this should be part of Milestone 0.4.0 already moved it.

@AlfredoG87 AlfredoG87 modified the milestones: 0.3.0, 0.4.0 Jan 15, 2025
Copy link
Contributor

@ata-nas ata-nas left a comment

Choose a reason for hiding this comment

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

Good job @mattp-swirldslabs! the logging looks really good!
I do think however that some changes are due in the sanity test and in the way we handle config classes we do not own. Also some optional nits and cleanup suggested.

@mattp-swirldslabs mattp-swirldslabs force-pushed the 00471-centralize-config-logging branch from 8a550cf to e167599 Compare January 16, 2025 15:34
Signed-off-by: Matt Peterson <[email protected]>
Copy link
Contributor

@AlfredoG87 AlfredoG87 left a comment

Choose a reason for hiding this comment

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

LGTM.

@mattp-swirldslabs @ata-nas @jsync-swirlds let's try to capture nits, improvements and suggestions on a follow-up ticket, and move forward with this, we cannot afford to spend any more time on some of the nits am reading here. This is way better than what we used to have (no logging or visibility of configuration loaded by the system).

My suggestions is to merge as currently is this PR.

@ata-nas
Copy link
Contributor

ata-nas commented Jan 17, 2025

LGTM.

@mattp-swirldslabs @ata-nas @jsync-swirlds let's try to capture nits, improvements and suggestions on a follow-up ticket, and move forward with this, we cannot afford to spend any more time on some of the nits am reading here. This is way better than what we used to have (no logging or visibility of configuration loaded by the system).

My suggestions is to merge as currently is this PR.

I would agree to that, @mattp-swirldslabs please kindly capture/acknowledge nits/considerations which came up above and for me the conversations would be considered resolved (which are not even final, could be or not be implemented in the long run, mind you there are already planned changes to the configuration with the query endpoint) and we can proceed.

P.S. @AlfredoG87 I agree on the time sensitivity, I am not trying to block. just some considerations come and I want to acknowledge them. My ask is not to resolve everything now, just to capture what comes to mind.

Copy link
Contributor

@ata-nas ata-nas left a comment

Choose a reason for hiding this comment

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

🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Block Node Issues/PR related to the Block Node. Feature Enhancement Enhancing an existing feature driven by business requirements. Typically backwards compatible.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Log Safety Mechanism Centralize Record Configuration Logging
4 participants