We are testing debug logging configuration in Bitbucket Data Center and have observed behavior that differs from our expectations regarding the interaction between bitbucket.properties and the administrative UI.
Following Atlassian documentation below:
https://confluence.atlassian.com/bitbucketserver094/enable-debug-logging-1489802964.html
we added the following entries to: Bitbucket_HOME/shared/bitbucket.properties
logging.logger.ROOT=DEBUG
logging.logger.com.atlassian.bitbucket=DEBUG
After restarting Bitbucket, we expected the logging configuration defined in bitbucket.properties to be reflected in the Administration → Logging and profiling UI, specifically the Debug Logging enable/disable state.
However, the UI checkbox does not appear to reflect the values configured in bitbucket.properties. Additionally, changing the values in bitbucket.properties does not seem to override the setting configured through the UI.
Questions
1. Is this behavior expected?
2. Does the Debug Logging UI setting have higher precedence than the logging configuration in bitbucket.properties?
Hi @Eranga DG
Please find my feedback below.
1. Is this behavior expected?
Yes, this is expected behaviour.
The logging.logger.* properties in bitbucket.properties and the Administration → Logging and Profiling UI are two independent mechanisms that operate at different points in the application lifecycle and do not share state with each other.
2. Does the Debug Logging UI setting have higher precedence than the logging configuration in bitbucket.properties?
Yes, UI has higher precedence but the Debug Logging toggle works via ifLevelUpgrade logic:
• It only changes a logger if the new level produces MORE logging than the current level
• Since ROOT and com.atlassian.bitbucket were already set to DEBUG via bitbucket.properties, enabling the toggle finds no upgrade to make → leaves them alone
• When disabling from UI, since those loggers were never upgraded by the toggle, there is no saved original level so they will not be restored and they remain at DEBUG.
Regards,
Aman
Thank you for the explanation Aman.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.