Auditing is disabled by default, To enable auditing, some changes we need to made.
here i explained in detailed where we need to change different audit related files.
go to auditConfig.xml, U can find this file in tomcat\webapps\alfresco\WEB-INF\classes\alfresco folder
change the value of enabled to true in place of false.
------------------------------------------------------------
<Audit xmlns="http://www.alfresco.org/model/audit/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" enabled="true" auditInternal="false" mode="all">
----------------------------------------------------------------------
**and copy this file into extension folder.
Next go to extension folder in alfresco root i.e.,\tomcat\shared\classes\alfresco\extension\
create a new file, name it as a custom-audit-services-context.xml and add this below code
-----------------------------------------------------------------------------------------------------
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!-- The configuration of the audit model -->
<bean id="auditConfiguration" class="org.alfresco.repo.audit.AuditConfigurationImpl">
<property name="config">
<value>alfresco/extension/auditConfig.xml</value>
</property>
</bean>
</beans>
--------------------------------------------------------------------------------------------------
to turn on debug for audit information change log4j.properties which is located in
\tomcat\webapps\alfresco\WEB-INF\classes uncomment the line which is shown below...
log4j.logger.org.alfresco.repo.audit.model=DEBUG
also you can enable alfresco-global.properties which is located in \tomcat\shared\classes
---------------------------------------
#Audit Configuration
audit.enabled = true
----------------------------------------
Also Enable file service and folder service in auditConfig.xml
-------------------------------------------------------------------------------
<!-- The File/Folder Service -->
<Service name="FileFolderService" mode="none">
<Method name="rename" mode="all"/>
<Method name="move" mode="all"/>
<Method name="copy" mode="all" auditInternal="true"/>
<Method name="create" mode="all"/>
<Method name="delete" mode="all"/>
<Method name="makeFolders" mode="all"/>
<Method name="getWriter" mode="all"/>
<Method name="getReader" mode="all"/>
</Service>
<Service name="ContentService" mode="none">
<Method name="getWriter" mode="all"/>
<Method name="transform" mode="all"/>
<Method name="getReader" mode="all"/>
</Service>
-------------------------------------------------------------------------------
Restart the server you will find tomcat screen like shown below
and add some documents to alfresco change some properties for that documents like opening,editing, and set permissions to that documents
Next go to ViewDetails on that document you have edited, click preview in template and select show_audit.ftl from the dropdown menu. you should be able to see all of the actions you just carried out on that document.
you will find the screen as shown below.