log4j Debugging Javascript in Workflow
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2009 03:40 PM
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:
I've enabled DEBUG on the log4j.propertoes file:
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
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

Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2009 07:38 PM
Found a mistake.
The properties entry should be:
Thanks
The properties entry should be:
log4j.logger.org.alfresco.repo.web.scripts=DEBUGlog4j.logger.org.alfresco.repo.web.scripts.ScriptLogger=DEBUG
Thanks

