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

log statements of level lower than INFO not shown after start #952

Closed
jgomer2001 opened this Issue Apr 11, 2018 · 6 comments

Comments

Projects
None yet
2 participants
@jgomer2001
Contributor

jgomer2001 commented Apr 11, 2018

Environment: RC2/RC3 for 3.1.3 (ubuntu 14)

Suppose these steps:

  • Set level to DEBUG
  • Restart identity
  • Login to oxtrust and do some activity

All statements in log are INFO or ERROR (no DEBUG).

  • Set level to TRACE
  • Do some activity

Statements now appear (DEBUG and TRACE)

  • Restart identity
  • Login to oxtrust and do some activity

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.

Handy tip:
An easy way to trigger a debug statement (requires scim+uma enabled):
Visit in a browser https://.../identity/restv1/scim/v2/Schemas/urn:ietf:params:scim:schemas:core:2.0:Group

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
you should be able to see the couple of log statements for this method https://github.com/GluuFederation/oxTrust/blob/version_3.1.3/server/src/main/java/org/gluu/oxtrust/service/scim2/serialization/ScimResourceSerializer.java#L194

@jgomer2001 jgomer2001 added the QA label Apr 11, 2018

@jgomer2001 jgomer2001 added this to the 3.1.3 milestone Apr 11, 2018

@yurem

This comment has been minimized.

Contributor

yurem commented Apr 17, 2018

I've checked this in debugger and in 3.1.3 RC4 after that. It works as expected. here is sample after enabling DEBUG:

default

@yurem

This comment has been minimized.

Contributor

yurem commented Apr 17, 2018

Can you retest it? After changing log level wait 30 seconds to allow oxTrust reload configuration from LDAP.

@yurem yurem closed this Apr 17, 2018

@yurem

This comment has been minimized.

Contributor

yurem commented Apr 30, 2018

@yurem yurem reopened this Apr 30, 2018

@yurem

This comment has been minimized.

Contributor

yurem commented Apr 30, 2018

To reproduce it we need to reboot oxTrust/oxAuth.

Also we need to add timer job to check if new loggers have right log level. The system might call some services after startup loggers configuration.

@yurem yurem modified the milestones: 3.1.3, 3.1.4 Apr 30, 2018

@yurem yurem added bug and removed QA labels May 2, 2018

@yurem

This comment has been minimized.

Contributor

yurem commented Aug 19, 2018

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.

@yurem yurem closed this Aug 19, 2018

@yurem

This comment has been minimized.

Contributor

yurem commented Aug 19, 2018

I added new log message to indite logger service work. Example:

[org.xdi.service.logger.LoggerService] (LoggerService.java:145) - Uppdated log level of '12' loggers to DEBUG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment