Current behavior:
Logger org.camunda.bpm.engine.jobexecutor logs all job execution failures on level WARNING. However, optimistic locking exception is a special exception in that it is to be expected in certain cases and we do not decrese job retries then. Logging the full stacktraces on WARNING therefore creates noise in the logs for operators. And lastly, the stacktrace of Optimistic Locking Exception is almost always the same, because it can only occur in the engine flush.
Expected behavior:
The presence and message of an optimistic locking exception is still logged on WARNING. The stacktrace is only logged on DEBUG. The WARNING message should inform the user that they can set the log level to DEBUG for details.
Sidenotes:
Check also for other exception logging (e.g. commands) if we should apply the same change there as well.