From d75e264fee634432df7c57cb7e66d9bef965b763 Mon Sep 17 00:00:00 2001 From: Andrei Rebegea Date: Wed, 18 May 2016 14:29:47 +0000 Subject: [PATCH] Merged 5.0.N (5.0.4) to 5.1.N (5.1.2) 127179 cturlica: Merged V4.2-BUG-FIX (4.2.7) to 5.0.N (5.0.4) 127119 adragoi: MNT-16270 : Audit logger org.alfresco.repo.audit.inbound fails to log inbound auditable values - checked inboundLogger level value on areAuditValuesRequired() method git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.1.N/root@127217 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- source/java/org/alfresco/repo/audit/AuditComponent.java | 6 +++--- source/java/org/alfresco/repo/audit/AuditComponentImpl.java | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/source/java/org/alfresco/repo/audit/AuditComponent.java b/source/java/org/alfresco/repo/audit/AuditComponent.java index 35a9aff437..3e79890de9 100644 --- a/source/java/org/alfresco/repo/audit/AuditComponent.java +++ b/source/java/org/alfresco/repo/audit/AuditComponent.java @@ -93,9 +93,9 @@ public interface AuditComponent public boolean areAuditValuesRequired(); /** - * Determine whether there are any audit applications registered to record data for the given - * path. This helper method gives data producers a shortcut in the event that nothing would - * be recorded in any event. + * Determines if audit values are required based on whether there are any audit applications + * registered to record data for the given path. This helper method gives data producers a + * shortcut in the event that nothing would be recorded in any event. * * @param path the audit path * @return Returns true if there is at least one audit application diff --git a/source/java/org/alfresco/repo/audit/AuditComponentImpl.java b/source/java/org/alfresco/repo/audit/AuditComponentImpl.java index 502ea9072b..6ceee76100 100644 --- a/source/java/org/alfresco/repo/audit/AuditComponentImpl.java +++ b/source/java/org/alfresco/repo/audit/AuditComponentImpl.java @@ -263,6 +263,10 @@ public class AuditComponentImpl implements AuditComponent /** * {@inheritDoc} + *

+ * Note that if DEBUG is on for the the {@link #INBOUND_LOGGER}, then true + * will always be returned. + * * @since 3.4 */ @Override @@ -270,7 +274,7 @@ public class AuditComponentImpl implements AuditComponent { PathMapper pathMapper = auditModelRegistry.getAuditPathMapper(); Set mappedPaths = pathMapper.getMappedPathsWithPartialMatch(path); - return mappedPaths.size() > 0; + return loggerInbound.isDebugEnabled() || mappedPaths.size() > 0; } /**