-
Task
-
Resolution: Fixed
-
L3 - Default
-
None
Current behavior:
- Exceptions are logged in two places:
- In consequence, job failures are logged twice
Expected behavior:
- Case 1 - User code calls API: Engine does not log exception; the user's code should do that (or whoever calls that, in case the exception bubbles further up)
- Case 2 - User code executes a job: same as case 1; no logging
- Case 3 - Job executor executes job: Exception is logged once in ExecuteJobsRunnable
- I can optionally enable logging of all command failures (in CommandContext#close) => this will lead to duplicated logging in case of job execution
Side notes:
- Default for optional failure logging: 7.11.x: enabled by default to not change logging behavior; 7.12.0: disabled by default with note in migration guide
- The engine should always log exceptions that would otherwise get swallowed, e.g. when an exception occurs during transaction rollback, it may get swalled (confer CommandContext#close)
- This will undo some changes made with
CAM-10067, in particular, the flag for logging of command exeptions from application threads will be replaced by the flag for generally logging command failures; the flag for logging job failures on the last try will only apply to the logging in ExecuteJobsRunnable