Open paulkorir opened 3 years ago
Hi @paulkorir, thanks for the feedback. To try to clarify your use case, would this happen in the case of separate omero import
calls using the same stdout/stderr output file i.e.
omero import file.tiff --file import.out --err import.err
omero import file2.tiff --file import.out --err import.err
currently overwrite import.out
and import.err
but you would like some mechanism for appending instead?
Yes. Exactly.
This useful in case the first omero import
fails and there is a retry mechanism. It would be helpful to know the reason of the failure and subsequence success.
Thanks for replying so fast.
Thanks for the extra information. As a starting point, https://github.com/ome/omero-py/pull/223 added some logic to allow appending to log files in the case of consecutive bulk imports. If this is an immediate blocker, I would think the starting point would be to update:
and use mode = "a"
unconditionally.
See https://github.com/ome/omero-py/pull/223#discussion_r444694596 for a related discussion about overwriting /appending/suffixing. Happy to hear your thoughts about what would make sense in terms of API. And as always, feel free to open a contribution as a PR directly against this repository :)
This is a feature request.
Please consider adding an option to append logs to a given file instead overwriting the logs.