I have a script where all of the logging (output, errors etc) are captured in one single log file each day.
This script can be called more then 10k times a day, with a maximum of 3 calls simultaneously.
The problem I'm facing at the moment is that sometimes the logging is writing through each other in the same logfile when they executed simultaneously.
I was already looking into options like flock and semaphores to solve this, but this could create a queue on execution of the process itself, which is not desired in my case.
So I was wondering if it's possible to do the logging in some other kind of other process, where it only writes in the logfile when no other process is writing? with a result that the logfile is 'clean' and calls towards the script run as it is at the moment, without any delay?