Bug 794129 (JBEPP-1195) - Log level improvement in FallbackIdentityStoreRepository class (PicketLink IDM)
Summary: Log level improvement in FallbackIdentityStoreRepository class (PicketLink IDM)
Keywords:
Status: CLOSED NEXTRELEASE
Alias: JBEPP-1195
Product: JBoss Enterprise Portal Platform 5
Classification: JBoss
Component: unspecified
Version: 5.1.0.GA
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 5.2.1.GA
Assignee: mposolda
QA Contact:
URL: http://jira.jboss.org/jira/browse/JBE...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-21 15:19 UTC by Bruno Machado
Modified: 2012-03-27 23:59 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-02-20 13:33:21 UTC
Type: Enhancement
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBEPP-1195 0 Major Closed Log level improvement in FallbackIdentityStoreRepository class (PicketLink IDM) 2012-12-18 06:10:56 UTC

Description Bruno Machado 2011-09-21 15:19:16 UTC
Help Desk Ticket Reference: https://c.na7.visual.force.com/apex/Case_View?id=500A0000008Qeyd&sfdc.override=1
project_key: JBEPP

org.picketlink.idm.impl.repository.FallbackIdentityStoreRepository doesn't throw an ERROR exception when a ldap connection has timed out.

To see that exception user needs to enable the INFO logging to "org.picketlink" category, then it prints the failed connection attempt successfully.

2011-09-19 11:54:44,315 INFO  [org.picketlink.idm.impl.repository.FallbackIdentityStoreRepository] (main) Failed to create IdentityObject: 
org.picketlink.idm.common.exception.IdentityException: Could not obtain LDAP connection: 

Caused by: javax.naming.CommunicationException: [host]:[port] [Root exception is java.net.SocketTimeoutException: connect timed out]

This enhancement is to change the log level of from INFO to ERROR and to improve the log messages in

./picketlink-idm/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/repository/FallbackIdentityStoreRepository.java

Instead of using INFO it would be easier to see the issue with an ERROR log level.

Here is an example of log to be improved/changed to ERROR:

      try
      {
         [source]
      }
      catch (IdentityException e)
      {
         if (log.isLoggable(Level.INFO))
         {
            log.log(Level.INFO, "Failed to create IdentityObject: ", e);
         }
      }

Comment 2 Jared MORGAN 2011-11-16 01:05:03 UTC
Release Notes Docs Status: Added: Not Yet Documented


Comment 3 hfnukal@redhat.com 2012-01-13 11:41:03 UTC
Labels: Added: EPP_5_2_1_Candidate


Comment 4 mposolda 2012-02-03 15:34:21 UTC
I've commited fix into Picketlink IDM trunk - https://source.jboss.org/changelog/PicketLink?cs=1367 . I added SEVERE logging instead of INFO for all exceptions, which are not propagated to the caller. For those, which are propagated there is FINER logging, but it seems to be sufficient since the exception should be processed and logged by the caller.

btw. I used SEVERE category instead of ERROR, because Picketlink IDM is using JDK logging and it does not support ERROR category (categories are SEVERE, WARN, INFO, FINE, FINER, FINEST)

Comment 5 mposolda 2012-02-03 15:35:49 UTC
Only needed action is to release Picketlink IDM and update dependency in EPP pom.xml.

Comment 6 boleslaw.dawidowicz 2012-02-16 09:27:15 UTC
Labels: Removed: EPP_5_2_1_Candidate 


Comment 7 mposolda 2012-02-20 13:33:21 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Release notes docs status: Not Yet Documented

Release notes text: CAUSE: Class FallbackIdentityStoreRepository from library Picketlink IDM was using insufficient logging in some places, because some errors were reported into log with log level INFO, which may cause that customer can miss some important error messages.

FIX: It's fixed in library Picketlink IDM. I added SEVERE logging
instead of INFO for all exceptions, which are not propagated to the caller. For
those, which are propagated there is FINER logging, but it seems to be
sufficient since the exception should be processed and logged by the caller.

btw. I used SEVERE category instead of ERROR, because Picketlink IDM is using
JDK logging and it does not support ERROR category (categories are SEVERE,
WARN, INFO, FINE, FINER, FINEST)

Comment 8 mposolda 2012-03-22 19:41:13 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,6 +1,4 @@
-Release notes docs status: Not Yet Documented
-
-Release notes text: CAUSE: Class FallbackIdentityStoreRepository from library Picketlink IDM was using insufficient logging in some places, because some errors were reported into log with log level INFO, which may cause that customer can miss some important error messages.
+CAUSE: Class FallbackIdentityStoreRepository from library Picketlink IDM was using insufficient logging in some places, because some errors were reported into log with log level INFO, which may cause that customer can miss some important error messages.
 
 FIX: It's fixed in library Picketlink IDM. I added SEVERE logging
 instead of INFO for all exceptions, which are not propagated to the caller. For

Comment 9 Jared MORGAN 2012-03-27 23:59:34 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,10 +1 @@
-CAUSE: Class FallbackIdentityStoreRepository from library Picketlink IDM was using insufficient logging in some places, because some errors were reported into log with log level INFO, which may cause that customer can miss some important error messages.
+It was discovered that the Picketlink IDM FallbackIdentityStoreRepository class was using INFO logging instead of an elevated log level. Customers could miss important error information in the logs because INFO is commonly used for non-critical errors. The fix implements SEVERE logging category changes for all exceptions that are not propagated to the caller. For exceptions that are propagated to the caller, FINER logging is configured because these exceptions should be processed and logged by the caller.-
-FIX: It's fixed in library Picketlink IDM. I added SEVERE logging
-instead of INFO for all exceptions, which are not propagated to the caller. For
-those, which are propagated there is FINER logging, but it seems to be
-sufficient since the exception should be processed and logged by the caller.
-
-btw. I used SEVERE category instead of ERROR, because Picketlink IDM is using
-JDK logging and it does not support ERROR category (categories are SEVERE,
-WARN, INFO, FINE, FINER, FINEST)


Note You need to log in before you can comment on or make changes to this bug.