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
This commit is contained in:
Andrei Rebegea
2016-05-18 14:29:47 +00:00
parent f3186aa189
commit d75e264fee
2 changed files with 8 additions and 4 deletions

View File

@@ -93,9 +93,9 @@ public interface AuditComponent
public boolean areAuditValuesRequired(); public boolean areAuditValuesRequired();
/** /**
* Determine whether there are any audit applications registered to record data for the given * Determines if audit values are required based on whether there are any audit applications
* path. This helper method gives data producers a shortcut in the event that nothing would * registered to record data for the given path. This helper method gives data producers a
* be recorded in any event. * shortcut in the event that nothing would be recorded in any event.
* *
* @param path the audit path * @param path the audit path
* @return Returns <tt>true</tt> if there is at least one audit application * @return Returns <tt>true</tt> if there is at least one audit application

View File

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