cancel
Showing results for 
Search instead for 
Did you mean: 

Javascript logging in workflows

mcurko
Champ in-the-making
Champ in-the-making
Hello,

I'm trying to achieve logging from javascript code in a workflow, but with no success. This is an excerpt from the workflow code I'm using:

<event type="process-start"> <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">   <script>      if (logger.isLoggingEnabled())      {        logger.log("Please log something…");      }   </script> </action></event>‍‍‍‍‍‍‍‍‍‍

and here is a part of my log4j.properties (you can see I tried everything):

log4j.logger.org.alfresco.repo.jscript=DEBUGlog4j.logger.org.alfresco.repo.workflow=DEBUGlog4j.logger.org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript=DEBUGlog4j.logger.org.alfresco.repo.web.srcipts=DEBUGlog4j.logger.org.alfresco.repo.web.srcipts.ScriptLogger=DEBUGlog4j.logger.org.alfresco.repo.jscript.ScriptLogger=DEBUG‍‍‍‍‍‍

I'm checking the alfresco.log file to see if anything gets in there, but it doesn't.
I really have no idea what else to try…
3 REPLIES 3

carlos_miguens
Champ on-the-rise
Champ on-the-rise
Hi
What version of Alfresco are you running?
Carlos

mcurko
Champ in-the-making
Champ in-the-making
I'm using Alfresco version: Community v3.4.0 (d 3370)

mjboere
Champ in-the-making
Champ in-the-making
I ran into the same issue. This solved it for me.
(thanks to this forum thread)
https://forums.alfresco.com/en/viewtopic.php?f=10&t=21838

# Repository
log4j.logger.org.alfresco.repo.web.scripts=warn
log4j.logger.org.alfresco.repo.web.scripts.BaseWebScriptTest=info
log4j.logger.org.alfresco.repo.web.scripts.AlfrescoRhinoScriptDebugger=off
log4j.logger.org.alfresco.repo.jscript=DEBUG
log4j.logger.org.alfresco.repo.jscript.ScriptLogger=debug               <========= Setting this one to debug
log4j.logger.org.alfresco.repo.cmis.rest.CMISTest=info