JURA log file lifecycle re-work (Fixes BUGZ-3737)
Begin arcbot message
This merge request is automatically copied from !255 (merged) orginally made by @slu
End arcbot message
## JURA log file lifecycle re-work (Fixes BUGZ-3737)
Re-implement JURA log file processing life-cycle
Previous implementation was going through all the A-REX logfile in directory and cloning each logfile representation in memory for each configured destinations, then invoking submission but suppressing removal of the logfile on disk (because it is shared!) The problem was that logfile was never deleted and was processed each invocation unconditionally. The problem was reported as BUGZ-3737.
Destination implementations are expected to remove logfile passed to them after successful submission to prevent it from processing the same file twice. Proposed implementation goes through all A-REX logfiles in directory and generates new logfiles in the same directory per each configured reporting destination and deletes the original logfile after that. All destination-specific logfiles are also processed in the same loop without removal suppression. Usage record archive file duplication does not occur because all per-destination logfiles store inherited A-REX log filename so that XML files are based on that name instead of current filename.