Logging each process definition to separate file


My team is working with Camunda BPMN for a few months on a set of processes, currently using Camunda with Tomcat and we would like to know if it is possible to have individual log files for each process.

The diagrams we built do not use any java delegate. We use:

  • expression language to set/get variables
  • javascript scripts for transformations/actions
  • connectors when we need api data
  • slf4j inside scripts to log

Is there a way we can create separate log files for each process without using java? We found Ilya_Malyarenko’s response in the thread below, but they deployed each process as a war, which is something we would like to avoid.

We’d like to achieve that without using a war file for each of them. We also found another thread where gcalvo replaces JULI with logback. We tried the steps mentioned there by Thorben but no files were created and nothing was appended in catalina.log either. We’re not sure yet if we messed something up or if the steps are outdated for the version of tomcat we use. Also, with this approach, we’re not sure on how we should append the technical errors to each appropiate file, since we’re using the logger in js scripts.

The tomcat version we currently use is 9.0.36.

Best Regards


What we ended up doing is using something similar to this (a modified version):

In JS scripts we simply had a different logger name for each process, so all the INFO logs go to separate files. The technical errors are all appended in the same file and identified by processDefinitionId and processInstanceId.

Best Regards