JustSomeGuy wrote:
[color=blue]
> I had written a debugging/trace loggin class that l have been using to
> test and develope my applications...[/color]
Sounds like a great place to start writing unit tests on your code.
[color=blue]
> At first the application was tested and ran as a single thread, with all
> output going to a single file, but now the application has been expanded
> to run in multiple threads...[/color]
Why multiple threads?
[color=blue]
> What would you do to the 'cerr' class in order for each thread to have
> it's own output?[/color]
Get on a newsgroup covering threads for your platform, and ask about "thread
local storage". You can create one file handle per thread.
Alternately, add another thread. All the worker threads push loggable items
into a queue, and the other thread (maybe lower priority) pops items out of
the queue and logs them.
But try to take the threads out first. An event driven architecture is
always better.
--
Phlip
http://industrialxp.org/community/bi...UserInterfaces