logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giovanni Parodi <giovanniparod...@gmail.com>
Subject Sharing the same log file from concurrent two processes
Date Thu, 29 Nov 2012 14:33:32 GMT
Hello everybody,
I have a question about logging with log4cxx from different process.
I have two different .exe that link the same log4cxx dll.
I would like that both the exe uses the same configuration file and so
write in the same log file.
I was able to get this result, however I think that I did something wrong.

I'm generating two .exe by building the attached cpp code, and both load
the conf file in attachment.

When I run the exes, it seems that everything works fine, and the log file
example.log is fine.
However I don't understand if my approach is fine.
That is, how it is possible that the two processes don't access at the same
time the log file generating by this way a conflict and corrupting it?

I think that I should generate a logging exe that receives the messages
from other processes and that then, from a single exe, I should access the
Is there any suggestion? I'm a bit confused, any link/idea/feedback will be

View raw message