Hi all,

I am a little stumped here, I have a nice little application that makes use
of Log4perl (which I really like a lot) and now that all the basic
functionality is in there I have started working on makking things go a
little faster. One of the things is optimizing the way data is fetched (all
data gets pulled in from a webbased API), of couse sending a single request
at a time is not realy optimal usage so threads where introduced in order to
process up to 10 requests at the same time, which speeds things up quite a
bit, but...

Does Log4perl work well with threads?

   - It seems to as I am not seeing any errors
   - All threads log to the same file which so far every time contains all
   lines expected
   - The Log4perl documentation does not state clearly if it is thread safe
   or not


I have looked at the Log4perl source code and at the
Log::Log4perl::Appender::File module that I am using to write the logs but
they do not seem to take into account multiple treads. Yet my knowledge of
threads and perl is not good enough to say for certain that this means, so
far I have just been lucky and in a strange situation things might still
blow up in my face or there is nothing to worry about and things will be
fine.

Does anyone on the list have experiance with Log4perl and threads, or is
able to confirm in another way if Log4perl is thread safe?

Thanks,

Rob

Reply via email to