Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
log statements of level lower than INFO not shown after start #952
Environment: RC2/RC3 for 3.1.3 (ubuntu 14)
Suppose these steps:
All statements in log are INFO or ERROR (no DEBUG).
Statements now appear (DEBUG and TRACE)
Neither DEBUG nor TRACE messages appear (only INFO or ERROR)
In summary, when starting it behaves as in INFO level. If changes are made afterwards, it logs correctly.
Entry point in code for this action is: https://github.com/GluuFederation/oxTrust/blob/version_3.1.3/server/src/main/java/org/gluu/oxtrust/ws/rs/scim2/SchemaWebService.java#L92
Root case of the issue is in dynamic nature of CDI. It creates components when they needed. As result Log Manager creates loggers with delay (first usage of class). Also it creates them with default setting specified in log4j2.xml. To resolve this issue I added timer job with invocation interval 15 seconds. It find loggers and apply required log level to newly created loggers.