SLF4J
Most ASEE Flow modules, including the ASEE Flow engine, use slf4j as logging “facade”. This allows users to direct logging output to the logging “backend” of their choice, such as logback or log4j.Preconfigured Logging with a Shared Process Engine
When installing ASEE Flow as a shared process engine in an application server, ASEE Flow logging is pre-configured. On all application servers except Wildfly, logging is pre-configured using the slf4j-jdk14 bridge. This means that ASEE Flow effectively re-directs all its logging to Java Util Logging. Both SLF4J API and the slf4j-jdk14 bridge are available in a shared classpath which means that they are available in the classpath of all applications deployed on these servers. On Wildfly, logging is directed to the JBoss logging infrastructure. The SLF4J API is not available in the classpath of custom applications by default.Adding a Logging Backend for Embedded Use
When using the ASEE Flow Maven modules in a custom application, only the slf4j API is pulled in transitively. If you do not provide any backend, nothing will actually be logged. In the following, we provide two alternative examples of how to set up logging. See the SLF4J Documentation for more detailed information on how to add a logging backend.Example Using Java Util Logging
If you do not care for a specific logging backend, the simplest option is to direct logging to Java Util Logging by adding the following maven dependency:Example Using Logback
For a more sophisticated logging setup we recommend using Logback. To do so, the following steps are necessary: Add the logback dependencylogback.xml. Example configuration:
Process Data Context
In order to provide details on the current execution context of log statements, we set process execution-specific data in the Mapped Diagnostic Context (MDC). The process data is held in the MDC for the time of process execution and removed from it after the execution context is successfully left. In case of arising exceptions upon execution, the data is kept in the MDC until the calling context, i.e. the JobExecutor or the surrounding command, finished its logging. The keys at which the properties are accessible in the MDC can be defined in the process engine configuration. In order to access the MDC data, you need to adjust the logging pattern of your logging configuration. An example using Logback could look as followscontext:[%X] to your configuration, all values that are present in the MDC at the time the log statement is created will be displayed.
Please refer to the manual of your logging framework for further information on how to access the MDC, e.g. the Logback documentation.
Logging Categories
Process Engine
The process engine logs on the following categories| Logger | Description |
|---|---|
org.camunda.bpm.application | logs details for the deployed process application on the engine |
org.camunda.bpm.container | logs container operations in the engine |
org.camunda.bpm.engine.bpmn.behavior | logs operations performed on bpmn activities |
org.camunda.bpm.engine.bpmn.parser | logs events that occur during the parsing of the bpmn models |
org.camunda.bpm.engine.cfg | logs process engine configuration’s initialization details |
org.camunda.bpm.engine.cmd | logs the start and end of all commands that the engine performs |
org.camunda.bpm.engine.cmmn.behavior | logs exceptions that occur during cmmn execution for incompatible cmmn behavior |
org.camunda.bpm.engine.cmmn.operation | logs exceptions during execution of cmmn operations |
org.camunda.bpm.engine.cmmn.transformer | logs cmmn transformer operations performed by the engine |
org.camunda.bpm.engine.context | command context logs including executing atomic operations and bpmn stack traces during exceptions You can override the default DEBUG log level for bpmn stack traces, see the Logging level parameters section. |
org.camunda.bpm.engine.core | logs engine’s core operations, e.g. performing atomic operations |
org.camunda.bpm.engine.dmn | logs exceptions that occur during decision evaluation |
org.camunda.bpm.dmn.feel | logs events that occur during decision evaluation with the JUEL FEEL Engine |
org.camunda.bpm.dmn.feel.scala | logs events that occur during decision evaluation with the Scala FEEL Engine |
org.camunda.feel.FeelEngine | logs events that occur during expression evaluation with the Scala FEEL Engine |
org.camunda.bpm.engine.externaltask | logger for the external task |
org.camunda.bpm.engine.identity | logger of the IdentityService, for example logs information whether a user is locked |
org.camunda.bpm.engine.incident | logs details during incident processing |
org.camunda.bpm.engine.jobexecutor | logs operations performed by the job executor, such as job acquisition |
org.camunda.bpm.engine.metrics | logs details regarding the engine metrics |
org.camunda.bpm.engine.migration | logs exceptions that occur during process migration |
org.camunda.bpm.engine.persistence | logs the identity of all entities that the engine inserts/deletes/updates in the database |
org.camunda.bpm.engine.plugin.admin | logs authorization details for administrators if AdministratorAuthorizationPlugin is enabled |
org.camunda.bpm.engine.pvm | logs the Process Virtual Machine (PVM) operations, e.g. entering/leaving an activity, creating/destroying a scope |
org.camunda.bpm.engine.rest.exception | logs the exceptions thrown in the REST API |
org.camunda.bpm.engine.script | logs script processing details, e.g. evaluating, compiling |
org.camunda.bpm.engine.security | logs exceptions that occur during password hashing |
org.camunda.bpm.engine.test | logger used in the engine tests |
org.camunda.bpm.engine.tx | logs transaction details, e.g. commits and rollbacks |
org.camunda.bpm.engine.util | logs engine utility operations like xml parsing, reading streams, class loading issues, parsing intervals/duration, etc. |
org.camunda.bpm.webapp | logs events from the ASEE Flow web apps (Cockpit, Tasklist, and Admin), like user-initiated log in and log out events and cache validation time information. |
ERROR, WARNING, and INFO. To enable more log output, e.g. for the purpose of debugging, configure the level of a logger to DEBUG or TRACE.
When to use engine loggers?
Increasing the level of some engine loggers can provide more insights to analyze the engine behavior. Please be aware, some of the loggers can create large amounts of output when changing their level toDEBUG or TRACE.
In this section, common scenarios are listed where increasing the engine log levels can be helpful.
Database statements
To check the database statements performed by the engine in most of the cases, it will be sufficient to increase the level oforg.camunda.bpm.engine.persistence and org.camunda.bpm.engine.impl.persistence.entity loggers.
On level DEBUG, they log all SQL statements with their parameters. When set to TRACE, the results of the statements are logged in addition. Note if a query has many results, the log output will be large.
However, some of the statements are not covered by only these two loggers. The full list to see all of the engine database statements is:
org.camunda.bpm.engine.persistenceorg.camunda.bpm.engine.impl.persistence.entityorg.camunda.bpm.engine.impl.history.eventorg.camunda.bpm.engine.impl.batchorg.camunda.bpm.engine.impl.cmmn.entityorg.camunda.bpm.engine.impl.dmn.entity.repositoryorg.camunda.bpm.engine.history
org.camunda.bpm.engine.impl.batch.BatchEntityorg.camunda.bpm.engine.impl.persistence.entity.JobEntityorg.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity
Diagnosing Job Execution
To investigate the Job Execution behavior, as a start switch the level of the following loggers toDEBUG:
org.camunda.bpm.engine.impl.persistence.entity.JobEntity- logs the job execution statementsorg.camunda.bpm.engine.jobexecutor- further job execution logs such as job acquisition and execution operationsorg.camunda.bpm.engine.cmd- the start/end of commands will help to determinate in which command the job is being executed
Diagnosing Deadlocks
The engine logging will provide further insights in case of deadlock issues by increasing the level of the command and the persistence loggers. First, determine the resource involved in the deadlock, then try to narrow down, which are the two transactions blocking each other:org.camunda.bpm.engine.persistence- the persistence logger will log all the identity of engine entities to find the involved resources causing the deadlockorg.camunda.bpm.engine.cmd- the command output will help to determinate the scope of the involved transactions which are causing the deadlock
VariableInstance), consider enabling the logger of that entity as well (org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity).
Then the output will include the statements of these entities to observe the changes which are performed.
Here is a sample of what traces the server log file will contain when increasing the level of these loggers.
RemoveExecutionVariablesCmd, the flush summary of the operation, and the database statements of the variable instance.
Legacy: Java Util Logging
Some ASEE Flow modules still use Java Util Logging directly. The use of Java Util Logging in these modules is considered deprecated and will be gradually migrated to slf4j in future releases. List of modules still using Java Util Logging:- camunda-ejb-service
- camunda-ejb-client
- camunda-jobexecutor-ra
- camunda-jobexecutor-rar
- camunda-engine-cdi
- camunda-engine-spring
- camunda-engine-rest
- Wildfly Subsystems