Clarify logging level property documentation
- Dominant language
- Java
- Stars
- 107
- Forks
- 29
- Avg merge
- 19h 46m
- Merged PRs (30d)
- 141
Description
### User Story
As a user of Sleeper, I want to the logging level configuration to be clear, so that when I configure application and library logging and it will behave as I expect.
### Description / Background
Split from:
- https://github.com/gchq/sleeper/issues/7389
The logging level properties have descriptions that are a bit vague, and the default values are not documented. We'd like to clarify this.
### Acceptance Criteria
**When** a developer adjusts the default value for a log level in the Log4J configuration value
**Then** this will automatically become the default value for the equivalent logging configuration property
**And** a user can see that value in the documentation and understand the behaviour
### Technical Notes / Implementation Details
The Log4J configuration is the log4j.properties file in the core module main resources. This is overridden during tests by a file with the same name in the test resources.
The instance properties are defined in LoggingLevelsProperty, and these populate environment variables that override the settings in the Log4J configuration. This is applied in EnvironmentUtils.
The property definitions are used to automatically generate the property documentation, and that includes the default values.
If we add default values to the property definitions, there would be no single source of truth for the default values. A developer might change them in the Log4J configuration and not realise the property definition needs to change as well.
We could add a unit test that would assert that the Log4J configuration and the property definition have the same default values. We'd need to decide how to read the Log4J configuration file without it being overridden by the file in the test resources.
Contributor guide
Assessment
This issue has not been assessed yet.