LesK <firstname.lastname@example.org> wrote:
> Logs are tricky things. A lot depends on what you're doing, how it's done
> and what you expect the log to show you.
> Sometimes you simply MUST have a single log file to track the exact
> sequence of events across multiple pieces of code, in my case, THE macros
> on Windows. The timestamp on Windows isn't fine enough to merge logs into
> the proper sequence of events.
I know about the timestamp problems... But Windows does at least allow a
single process to own a file, so you'd expect not to get log lines from one
writer mixed up with those of another.
I don't know that you can guarantee that sets of lines that several
processes wish to append to a common file will be written in the right order
though. Surely the best you can do is ensure that while one process's
output is being written, the other processes wait for an opportunity to do
their writes. You'd have to implement that wait/retry yourself I think, and
that'd probably mean you had no control over the order in which the tasks
actually got access to the file.
I know of no way in rexx to queue a desire to open a file so that each task
can later be given access to the log in the right order (I mean, without
designing such a thing, maybe using a shared data structure). Even if that
werre possible, is there a mechanism that does this at the OS level so that
apps written in other languages can also share the same log file?
Jeremy C B Nicoll - my opinions are my own.
Email sent to my from-address will be deleted. Instead, please reply
replacing "aaa" by "284".