Showing posts with label audit. Show all posts
Showing posts with label audit. Show all posts

Thursday, May 24, 2012

Auditing custom content types

Sometimes in important application requires auditing data. Alfresco provides auditing facility based on nodes behavior and actions.
In most cases out of box audit configuration is enough to satisfy the requirements, but sometime it requires certain kind of data also needs to be audited. Like we are auditing our own custom content types.

I have tested below configuration in Alfresco version 4.0 EE

E.g. I have my own custom content type say "clm:contract" and I want to monitor changes inside this node whether its create/read/update/delete.

We are including following configuration in alfresco-global.properties file to achieve this.

audit.enabled=true
audit.alfresco-access.enabled=true
audit.alfresco-access.sub-actions.enabled=true




### Audit Filter ### audit.filter.alfresco-access.default.enabled=true audit.filter.alfresco-access.transaction.user=~System;~null;.* audit.filter.alfresco-access.transaction.type=cm:folder;cm:content;st:site;clm:contract audit.filter.alfresco-access.transaction.path=~/sys:archivedItem;~/ver:;.*

Above configuration is enough to detect your custom content type clm:contract and auditing it.
If you want to see detailed log in console just write below configuration in log4j.properties file.

### Audit Logs ###
log4j.logger.org.alfresco.repo.audit.AuditComponentImpl=DEBUG
log4j.logger.org.alfresco.repo.audit.inbound=DEBUG

EnJOy !!