cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbernha...@apache.org
Subject cxf-fediz git commit: Improve logging
Date Thu, 28 Jan 2016 10:03:00 GMT
Repository: cxf-fediz
Updated Branches:
  refs/heads/master b0ea3455f -> af55d0a91


Improve logging


Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/af55d0a9
Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/af55d0a9
Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/af55d0a9

Branch: refs/heads/master
Commit: af55d0a9163fbbb2111f4cc1fea1f674bc0f4a41
Parents: b0ea345
Author: Jan Bernhardt <jbernhardt@talend.com>
Authored: Tue Jan 26 13:42:41 2016 +0100
Committer: Jan Bernhardt <jbernhardt@talend.com>
Committed: Thu Jan 28 10:57:01 2016 +0100

----------------------------------------------------------------------
 .../idp/service/security/GrantedAuthorityEntitlements.java     | 6 ++----
 services/sts/src/main/resources/log4j.properties               | 5 +++--
 2 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/af55d0a9/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/service/security/GrantedAuthorityEntitlements.java
----------------------------------------------------------------------
diff --git a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/service/security/GrantedAuthorityEntitlements.java
b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/service/security/GrantedAuthorityEntitlements.java
index d8c7bae..475ccd7 100644
--- a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/service/security/GrantedAuthorityEntitlements.java
+++ b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/service/security/GrantedAuthorityEntitlements.java
@@ -78,13 +78,11 @@ public class GrantedAuthorityEntitlements extends GenericFilterBean {
                         authorities.add(new SimpleGrantedAuthority(e.getName()));
                     }
                 } catch (Exception ex) {
-                    LOG.error("Role '" + roleName + "' not found");
+                    LOG.error("Role '{}' not found", roleName);
                 }
             }
+            LOG.debug("Granted Authorities: {}", authorities);
             
-            if (LOG.isDebugEnabled()) {
-                LOG.debug(authorities.toString());
-            }
             UsernamePasswordAuthenticationToken enrichedAuthentication = new UsernamePasswordAuthenticationToken(
                 currentAuth.getName(), currentAuth.getCredentials(), authorities);
             enrichedAuthentication.setDetails(currentAuth.getDetails());

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/af55d0a9/services/sts/src/main/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/services/sts/src/main/resources/log4j.properties b/services/sts/src/main/resources/log4j.properties
index a0cd737..1420788 100644
--- a/services/sts/src/main/resources/log4j.properties
+++ b/services/sts/src/main/resources/log4j.properties
@@ -5,7 +5,7 @@ log4j.logger.org.apache.cxf.sts=DEBUG, CONSOLE, LOGFILE
 log4j.additivity.org.apache.cxf.sts=false
 log4j.logger.org.apache.cxf.fediz=DEBUG, CONSOLE, LOGFILE
 log4j.additivity.org.apache.cxf.fediz=false
-log4j.logger.org.apache.cxf.sts.event.LoggerListener=DEBUG, AUDIT
+log4j.logger.org.apache.cxf.sts.event.map.MapEventLogger=DEBUG, AUDIT
 
 # CONSOLE is set to be a ConsoleAppender using a PatternLayout.
 log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
@@ -23,8 +23,9 @@ log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
 log4j.appender.LOGFILE.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n
 
 # AUDIT is set to be a File appender using a PatternLayout.
-log4j.appender.AUDIT=org.apache.log4j.FileAppender
+log4j.appender.AUDIT=org.apache.log4j.DailyRollingFileAppender
 log4j.appender.AUDIT.File=${catalina.base}/logs/audit.log
+log4j.appender.AUDIT.DatePattern='.'yyyy-MM-dd
 log4j.appender.AUDIT.Append=true
 log4j.appender.AUDIT.Threshold=DEBUG
 log4j.appender.AUDIT.layout=org.apache.cxf.sts.event.LoggerPatternLayoutLog4J


Mime
View raw message