I've got two separate programs running that each generate a log file (one is the output of device attached to a serial port, the other is the debug messages sent from a program commanding the aforementioned device).
What I'd like to be able to do is to correlate the debug messages printed by the commanding software with the responses received from the serial device. However, because the two programs are separate, it's not possible for me to have a look at a debug message in one file and figure out what data was sent back from the serial port at the same time.
What I'd like to find is something that can take the file streams of the two programs and combine them into one file.
I imagine a solution might work like this:
I'd set up the two programs to save their log files to two "virtual files", which would be created and monitored by this solution. The solution would continually monitor these virtual files and save their output to another file as an when data is written to the files.