cancel
Showing results for 
Search instead for 
Did you mean: 

log4j Debugging Javascript in Workflow

hyperation
Champ on-the-rise
Champ on-the-rise
Hello,

I am having trouble trying to enable log4j logs to appear in console or log files.

I modified the example AdHoc workflow a bit by adding logger.log lines:
   <task-node name="adhoc">      <task name="wf:adhocTask" swimlane="assignee">         <event type="task-create">            <script>             logger.log("Test DEBUG MODE 1");               if (bpm_workflowDueDate != void) taskInstance.dueDate = bpm_workflowDueDate;               if (bpm_workflowPriority != void) taskInstance.priority = bpm_workflowPriority;            </script>         </event>      </task>      <transition name="" to="completed">         <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">           <script>           logger.log("Test DEBUG MODE 2");              if (wf_notifyMe)              {                 var mail = actions.create("mail");                 mail.parameters.to = initiator.properties.email;                 mail.parameters.subject = "Adhoc Task " + bpm_workflowDescription;                 mail.parameters.from = bpm_assignee.properties.email;                 mail.parameters.text = "It's done";                 mail.execute(bpm_package);              }           </script>         </action>      </transition>   </task-node>   ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

I've enabled DEBUG on the log4j.propertoes file:
log4j.logger.org.alfresco.web.scripts=debuglog4j.logger.org.alfresco.repo.jscript=debuglog4j.logger.org.alfresco.repo.jscript.ScriptLogger=debug‍‍‍‍‍

But when I initiate the workflow in the default Alfresco UI there is nothing being logged.  The workflow goes through correctly in each state.  I see values like wf_notifyMe being populated in the Javascript Debugger.

Can someone please tell me what I did wrong or did not do so I can enable logging in the console?

Thanks
Smiley Happy
1 REPLY 1

hyperation
Champ on-the-rise
Champ on-the-rise
Found a mistake.

The properties entry should be:

log4j.logger.org.alfresco.repo.web.scripts=DEBUGlog4j.logger.org.alfresco.repo.web.scripts.ScriptLogger=DEBUG‍‍‍‍

Thanks
Smiley Happy