cancel
Showing results for 
Search instead for 
Did you mean: 

How to check the audit configuration ?

dcram
Champ in-the-making
Champ in-the-making
Hi,

I am trying to write a specific AuditComponent so as to make use of audit facts before sending them to the database.

I have studied for hours the code about auditing services in alfresco (org.alfresco.repo.audit and its subpackages) but I still don't understand where exactly in the code it is specifies to audit an entry if the auditConfig.xml file specifies to do so. With my AuditComponent implementation, every audit entry annotated as @Auditable in the classes is been auditing, and that is too much information for me (actually the default auditConfig.xml file would be a fine auditing configuration, if only I could apply it !)

If someone knows about auditing services and could explain me that particular point, I would be grateful.

Thanks in advance,
Damien
2 REPLIES 2

andy
Champ on-the-rise
Champ on-the-rise
Hi

The config is in auditConfig.xml. The method interceptor will pick up all methods with the annotation - for read access nothing should be audited.
Are you saying you see all this information in the audit tables?

See auditImpl in AuditComponentImpl and how it works out the the audit mode.

Andy

dcram
Champ in-the-making
Champ in-the-making
No, the information in the audit tables are the one defined in auditConfig.xml, as exepcted. I was trying to catch the audit states before they go into db, but I had actually added my code at the wrong place. Now, it is in the auditImpl method of AuditComponentImpl and it works fine, thanks Smiley Happy

But there are other points that I may have not understood well about auditing the repository services:
- I have read that the "auditInternal" attrubute is not yet used (http://wiki.alfresco.com/wiki/Audit), but I don't understand what this attribute is intended to…
- Could you also explain me the difference between AuditInfo and AuditState? I am a bit confused that a variable "auditInfo" is sometimes declared as an AuditState.

Thanks,
Damien