I've written a small process plugin which allows to enrich the logging MDC with the current process context (processInstanceId, businessKey, activityId, processDefinitionId). It is especially useful if you log out to JSON and push the logs to ELK, because log entries like
{
...
"@mdc": {
"activityId": "validateVacationRequest",
"processInstanceId":"ef95ecf5-d0bb-11e5-bdc7-002314a4d3d9",
"businessKey":"2",
"processDefinitionId":"vacationRequest:1:173a5a58-d0bb-11e5-bdc7-002314a4d3d9"
}
}
are indexed by the fields in MDC.
You can find the code and a short documentation here:
https://github.com/kifj/camunda-wildfly-logging
It's more of a proof of concept and I've only tested it on JBoss Wildfly, but I would like to hear your feedback. Bernd Ruecker affirmed me there may be interest and it could be of general usage.
Cheers
Johannes