P
Piper707
Hi,
I have a class with 4 methods. I want to use Log4j to log messages for
each of these methods to a common log file.
Ideally I would like the log messages for each method to be seperated
from the others. But if multiple users were to invoke the methods at
the same time, then the messages in my log file would be jumbled up
with the others.
I can probably try making the methods synchronized so i dont get into
this sort of trouble, but logging by itself doesn't seem to be a good
enough reason to be making methods synchronized.
What approach can I use to deal with this?
Thank you,
Rohit.
I have a class with 4 methods. I want to use Log4j to log messages for
each of these methods to a common log file.
Ideally I would like the log messages for each method to be seperated
from the others. But if multiple users were to invoke the methods at
the same time, then the messages in my log file would be jumbled up
with the others.
I can probably try making the methods synchronized so i dont get into
this sort of trouble, but logging by itself doesn't seem to be a good
enough reason to be making methods synchronized.
What approach can I use to deal with this?
Thank you,
Rohit.