cancel
Showing results for 
Search instead for 
Did you mean: 

Adding logger to workflow in alfresco 4.0 share

sradha
Champ on-the-rise
Champ on-the-rise
Hi,

I am using alfresco 4.0. I have added a logger to "Review and Approve" workflow . but i am not able to see the logger statement in  alfrescotomcat-stdout.log file.


modified in log4j.properties in share as

log4j.logger.org.alfresco.repo.jscript.ScriptLogger=DEBUG


then put the logger in  reviewbpmn20.xml file as


<userTask id="reviewTask" name="Review Task"
            activiti:formKey="wf:activitiReviewTask">
           <extensionElements>
               <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
                  <activiti:field name="script">
                     <activiti:string>
                logger.log("Hello, World!");
                        if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate
                        if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;
                  
                     </activiti:string>


</extensionElements>
            <humanPerformer>
                <resourceAssignmentExpression>
                    <formalExpression>${bpm_assignee.properties.userName}</formalExpression>
                </resourceAssignmentExpression>
            </humanPerformer>
        </userTask>
                  </activiti:field>
               </activiti:taskListener>

Can anybody tell me where I have done the wrong?
2 REPLIES 2

chupo
Champ in-the-making
Champ in-the-making
Hi Sradha,

You should modify file "log4j.properties" from folder $TOMCAT_HOME/webapps/alfresco/WEB-INF/classes/log4j.properties.
After that, you will see log entries in "stdout_<TIMESTAMP>.log"

Regards,
Nenad

dranakan
Champ on-the-rise
Champ on-the-rise
Hello,

Try with logger.debug("…")