Description
The various jars within the Qpid project contain log4.xml and log4j.properties files. The default initialisation procedures of Log4J can pick these up depending on which jars are in the Classpath and apply one of them before the main broker configuration process is undertaken programmaticaly in the Main class, which leads to a mixed configuration. This should be prevented to ensure only the etc/log4j.xml (or other command-line specified file) is the only configuration applied.
The Log4J configuration process proceeds even in the face of malformed XML, or invalid configuration details within valid XML content. The configuration process outputs warnings for malformed XML but does not halt, completing whatever it can but leaving the logging in an uncertain configuration. If an invalid logger level is found, Log4J just silently defaults the Logger (and any inheriting descendants) to DEBUG level.
The broker should validate the XML before applying it, and check that any logger levels are valid Log4J levels before allowing a configuration to be applied. At startup, an invalid XML configuration should resulti in the broker failing to startup. After startup, this should prevent the new configuration being loaded (eg by the XML WatchDog or manually via JMX) over the existing configuration.
Attachments
Issue Links
- incorporates
-
QPID-1975 Broker defaults to DEBUG for logging if log4j.xml is not available
- Closed