cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow output not shown in alfresco log

pallavi_jain
Champ in-the-making
Champ in-the-making
I am using Alfresco version 3.4.
I followed 'Alfresco Developer Guide' to deploy a simple 'hello world' workflow in alfresco using workflow console.
The workflow is sucessfully deployed but the problem is that I am not able to see anything in the logfiles.
I checked both alfresco.log and catalina.out.
What could be the posiible reason? Please help.
8 REPLIES 8

abarisone
Star Contributor
Star Contributor
Hi,
maybe Workflow related classes are not properly configured in log4j.xml application file in order to print log.
Namely, these classes may have a configured logger which has a ERROR logging level or is commented out.
Check this out…

Regards
Andrea

Thanks Andrea..
I checked it and here is my log4j.properties file:

# Set root logger level to error
log4j.rootLogger=error, Console, File

###### Console appender definition #######

# All outputs currently set to be a ConsoleAppender.
log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout

# use log4j NDC to replace %x with tenant domain / username
log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} %x %-5p [%c{3}] %m%n
#log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c] %m%n

###### File appender definition #######
log4j.appender.File=org.apache.log4j.DailyRollingFileAppender
log4j.appender.File.File=alfresco.log
log4j.appender.File.Append=true
log4j.appender.File.DatePattern='.'yyyy-MM-dd
log4j.appender.File.layout=org.apache.log4j.PatternLayout
log4j.appender.File.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c] %m%n

###### Hibernate specific appender definition #######
#log4j.appender.file=org.apache.log4j.FileAppender
#log4j.appender.file.File=hibernate.log
#log4j.appender.file.layout=org.apache.log4j.PatternLayout
#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n

###### Log level overrides #######

# Commented-in loggers will be exposed as JMX MBeans (refer to org.alfresco.repo.admin.Log4JHierarchyInit)
# Hence, generally useful loggers should be listed with at least ERROR level to allow simple runtime
# control of the level via a suitable JMX Console. Also, any other loggers can be added transiently via
# Log4j addLoggerMBean as long as the logger exists and has been loaded.

# Hibernate
log4j.logger.org.hibernate=error
log4j.logger.org.hibernate.util.JDBCExceptionReporter=fatal
log4j.logger.org.hibernate.event.def.AbstractFlushingEventListener=fatal
log4j.logger.org.hibernate.type=warn
log4j.logger.org.hibernate.cfg.SettingsFactory=warn

# Spring
log4j.logger.org.springframework=error
# Turn off Spring remoting warnings that should really be info or debug.
log4j.logger.org.springframework.remoting.support=error
log4j.logger.org.springframework.util=error

# Axis/WSS4J
log4j.logger.org.apache.axis=info
log4j.logger.org.apache.ws=info

# CXF
log4j.logger.org.apache.cxf=error

# MyFaces
log4j.logger.org.apache.myfaces.util.DebugUtils=info
log4j.logger.org.apache.myfaces.el.VariableResolverImpl=error
log4j.logger.org.apache.myfaces.application.jsp.JspViewHandlerImpl=error
log4j.logger.org.apache.myfaces.taglib=error

# OpenOfficeConnection
log4j.logger.net.sf.jooreports.openoffice.connection=fatal

# log prepared statement cache activity ###
log4j.logger.org.hibernate.ps.PreparedStatementCache=info

# Alfresco
log4j.logger.org.alfresco=INFO
log4j.logger.org.alfresco.repo.admin=info
log4j.logger.org.alfresco.repo.cache.TransactionalCache=warn
log4j.logger.org.alfresco.repo.model.filefolder=info
log4j.logger.org.alfresco.repo.tenant=info
log4j.logger.org.alfresco.repo.avm=info
log4j.logger.org.alfresco.config=info
log4j.logger.org.alfresco.config.JndiObjectFactoryBean=warn
log4j.logger.org.alfresco.config.JBossEnabledWebApplicationContext=warn
log4j.logger.org.alfresco.repo.management.subsystems=info
log4j.logger.org.alfresco.repo.management.subsystems.ChildApplicationContextFactory$ChildApplicationContext=warn
log4j.logger.org.alfresco.repo.security.sync=info
log4j.logger.org.alfresco.repo.security.person=info

log4j.logger.org.alfresco.sample=info
log4j.logger.org.alfresco.web=info
#log4j.logger.org.alfresco.web.app.AlfrescoNavigationHandler=debug
#log4j.logger.org.alfresco.web.ui.repo.component.UIActions=debug
#log4j.logger.org.alfresco.web.ui.repo.tag.PageTag=debug
#log4j.logger.org.alfresco.web.bean.clipboard=debug
log4j.logger.org.alfresco.repo.webservice=info
log4j.logger.org.alfresco.service.descriptor.DescriptorService=info
#log4j.logger.org.alfresco.web.page=debug

log4j.logger.org.alfresco.repo.importer.ImporterBootstrap=error
#log4j.logger.org.alfresco.repo.importer.ImporterBootstrap=info

log4j.logger.org.alfresco.web.ui.common.Utils=error
#log4j.logger.org.alfresco.web.ui.common.Utils=info

log4j.logger.org.alfresco.repo.admin.patch.PatchExecuter=info
log4j.logger.org.alfresco.repo.domain.patch.ibatis.PatchDAOImpl=info

# Specific patches
log4j.logger.org.alfresco.repo.admin.patch.impl.DeploymentMigrationPatch=info
log4j.logger.org.alfresco.repo.version.VersionMigrator=info
log4j.logger.org.alfresco.repo.admin.patch.impl.ResetWCMToGroupBasedPermissionsPatch=info

log4j.logger.org.alfresco.repo.module.ModuleServiceImpl=info
log4j.logger.org.alfresco.repo.domain.schema.SchemaBootstrap=info
log4j.logger.org.alfresco.repo.admin.ConfigurationChecker=info
log4j.logger.org.alfresco.repo.node.index.AbstractReindexComponent=warn
log4j.logger.org.alfresco.repo.node.index.IndexTransactionTracker=warn
log4j.logger.org.alfresco.repo.node.index.FullIndexRecoveryComponent=info
log4j.logger.org.alfresco.repo.node.index.AVMFullIndexRecoveryComponent=info
log4j.logger.org.alfresco.util.OpenOfficeConnectionTester=info
log4j.logger.org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl=warn
log4j.logger.org.alfresco.repo.domain.hibernate.DirtySessionMethodInterceptor=warn
log4j.logger.org.alfresco.repo.transaction.RetryingTransactionHelper=warn
log4j.logger.org.alfresco.util.transaction.SpringAwareUserTransaction.trace=warn
log4j.logger.org.alfresco.repo.jgroups.AlfrescoJGroupsChannelFactory=info
log4j.logger.org.alfresco.enterprise.repo.cache.jgroups.JGroupsKeepAliveHeartbeatReceiver=info
log4j.logger.org.alfresco.repo.version.Version2ServiceImpl=warn

#log4j.logger.org.alfresco.web.app.DebugPhaseListener=debug
#log4j.logger.org.alfresco.repo.cache.EhCacheTracerJob=debug

log4j.logger.org.alfresco.repo.workflow=error
#log4j.logger.org.alfresco.repo.workflow=info

# CIFS server debugging
log4j.logger.org.alfresco.smb.protocol=error
#log4j.logger.org.alfresco.smb.protocol.auth=debug
#log4j.logger.org.alfresco.acegi=debug

# FTP server debugging
log4j.logger.org.alfresco.ftp.protocol=error
#log4j.logger.org.alfresco.ftp.server=debug

# WebDAV debugging
#log4j.logger.org.alfresco.webdav.protocol=debug
log4j.logger.org.alfresco.webdav.protocol=error

# NTLM servlet filters
#log4j.logger.org.alfresco.web.app.servlet.NTLMAuthenticationFilter=debug
#log4j.logger.org.alfresco.repo.webdav.auth.NTLMAuthenticationFilter=debug

# Kerberos servlet filters
#log4j.logger.org.alfresco.web.app.servlet.KerberosAuthenticationFilter=debug
#log4j.logger.org.alfresco.repo.webdav.auth.KerberosAuthenticationFilter=debug

# File servers
log4j.logger.org.alfresco.fileserver=warn

# Repo filesystem debug logging
#log4j.logger.org.alfresco.filesys.repo.ContentDiskDriver=debug

# AVM filesystem debug logging
#log4j.logger.org.alfresco.filesys.avm.AVMDiskDriver=debug

# Integrity message threshold - if 'failOnViolation' is off, then WARNINGS are generated
log4j.logger.org.alfresco.repo.node.integrity=ERROR

# Indexer debugging
log4j.logger.org.alfresco.repo.search.Indexer=error
#log4j.logger.org.alfresco.repo.search.Indexer=debug

log4j.logger.org.alfresco.repo.search.impl.lucene.index=error
#log4j.logger.org.alfresco.repo.search.impl.lucene.index=DEBUG

# Audit debugging
# log4j.logger.org.alfresco.repo.audit=DEBUG
# log4j.logger.org.alfresco.repo.audit.model=DEBUG

# Forms debugging
# log4j.logger.org.alfresco.web.forms=debug
# log4j.logger.org.chiba.xml.xforms=debug
log4j.logger.org.alfresco.web.forms.xforms.XFormsBean=error
log4j.logger.org.alfresco.web.forms.XSLTRenderingEngine=error

# Property sheet and modelling debugging
# change to error to hide the warnings about missing properties and associations
log4j.logger.alfresco.missingProperties=warn
log4j.logger.org.alfresco.web.ui.repo.component.property.UIChildAssociation=warn
log4j.logger.org.alfresco.web.ui.repo.component.property.UIAssociation=warn
#log4j.logger.org.alfresco.web.ui.repo.component.property=debug

# Dictionary/Model debugging
log4j.logger.org.alfresco.repo.dictionary=warn
log4j.logger.org.alfresco.repo.dictionary.types.period=warn

# Virtualization Server Registry
log4j.logger.org.alfresco.mbeans.VirtServerRegistry=error

# Spring context runtime property setter
log4j.logger.org.alfresco.util.RuntimeSystemPropertiesSetter=info

# Debugging options for clustering
log4j.logger.org.alfresco.repo.content.ReplicatingContentStore=error
log4j.logger.org.alfresco.repo.content.replication=error

#log4j.logger.org.alfresco.repo.deploy.DeploymentServiceImpl=debug

# Activity service
log4j.logger.org.alfresco.repo.activities=info

# User usage tracking
log4j.logger.org.alfresco.repo.usage=info

# Sharepoint
log4j.logger.org.alfresco.module.vti=info

# Forms Engine
log4j.logger.org.alfresco.repo.forms=info
log4j.logger.org.alfresco.web.config.forms=info
log4j.logger.org.alfresco.web.scripts.forms=info

# CMIS
log4j.logger.org.alfresco.cmis=error
log4j.logger.org.alfresco.cmis.dictionary=warn

# IMAP
log4j.logger.org.alfresco.repo.imap=info

# JBPM
# Note: non-fatal errors (eg. logged during job execution) should be handled by Alfresco's retrying transaction handler
log4j.logger.org.jbpm.graph.def.GraphElement=fatal

#log4j.logger.org.alfresco.repo.googledocs=debug

###### Scripting #######

# Web Framework
log4j.logger.org.springframework.extensions.webscripts=info
log4j.logger.org.springframework.extensions.webscripts.ScriptLogger=warn
log4j.logger.org.springframework.extensions.webscripts.ScriptDebugger=off

# Repository
log4j.logger.org.alfresco.repo.web.scripts=DEBUG
log4j.logger.org.alfresco.repo.jscript=error
log4j.logger.org.alfresco.repo.jscript.ScriptLogger=DEBUG
log4j.logger.org.alfresco.repo.web.scripts.BaseWebScriptTest=info
log4j.logger.org.alfresco.repo.web.scripts.AlfrescoRhinoScriptDebugger=off
log4j.logger.org.alfresco.repo.cmis.rest.CMISTest=info

log4j.logger.org.alfresco.repo.avm.actions=info

# Freemarker
# Note the freemarker.runtime logger is used to log non-fatal errors that are handled by Alfresco's retrying transaction handler
log4j.logger.freemarker.runtime=

#
# Temporary check in.
#
log4j.logger.org.alfresco.repo.avm.AVMSyncServiceImpl=info
log4j.logger.org.alfresco.repo.avm.AVMServiceLocalTest=debug

log4j.logger.org.alfresco.repo.workflow=DEBUG

The problem still persists. No workflow related logs are registered in log file.

mitpatoliya
Star Collaborator
Star Collaborator
you have two entries of
log4j.logger.org.alfresco.repo.workflow in your property file
also you can keep level as "info" if you want more detailed logs.

Thanks
I rectified that and made just one entry to log4j.logger.org.alfresco.repo.workflow and set it to 'info'.
But workflow log is still not logged.

mitpatoliya
Star Collaborator
Star Collaborator
Actually if you look into the code there itself there no significant logging is done.Only exceptions are logged.So, that could be the case.

you can also add following workflow related package under log like
org.alfresco.service.cmr.workflow

Is there any specific information you are trying to capture?

I am just trying to implement a simple workflow with following processdefinition.xml file:

<?xml version="1.0" encoding="UTF-8"?>

<process-definition  xmlns="urn:jbpm.org:jpdl-3.1.4"  name="HelloWorldFork">


   <start-state name="start-state1">
      <transition to="fork1"></transition>
   </start-state>


   <fork name="fork1">
      <transition to="node C"></transition>
      <transition to="node D" name="to node D"></transition>
   </fork>

   <join name="join1">
      <transition to="end-state1"></transition>
   </join>

   <node name="node C">
      <transition to="join1"></transition>
      <action class=
      "org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
      <script>
      logger.log("Hello World! From Node C!");
      </script>
      </action>
   </node>

   <node name="node D">
      <transition to="join1"></transition>
      <action class=
      "org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
      <script>
      logger.log("Hello World! From Node D!");
      </script>
      </action>
   </node>


   <end-state name="end-state1"></end-state>


</process-definition>

But the log.logger doesn't seem to do anything. The workflow executes finely. It is just that nothing is written in the log as specified in the processdefinition.xml.(logger.log("Hello World! From Node C!"):smileywink:

mitpatoliya
Star Collaborator
Star Collaborator
hey could you try adding this as well?
log4j.logger.org.alfresco.repo.jscript=error
log4j.logger.org.alfresco.repo.jscript.ScriptLogger=debug

I already have these entries in my log4j.properties.
I tried it…didn't work. Smiley Sad