in reply to Multiple processes using Log::Log4perl to write into single log

Just a thought, but...   might there be a way to write the log information to some kind of pipe?  (Yes, they have ’em in WinXP too.)   This pipe would be opened for writing by many processes, but would be consumed by one logging process that did nothing else but read the entries and write them to the log.

What this (might...) do is to avoid contention for the log file, which otherwise could oblige the multiple worker processes to, in effect, run sequentially.

Replies are listed 'Best First'.
Re^2: Multiple processes using Log::Log4perl to write into single log
by bobr (Monk) on Sep 20, 2010 at 18:48 UTC
    I was thinking to replace current file based approach with something else. There are several other options, but I did not dig too much into them:
    • DBI appender can write into database. That might also have other advantages like easy remote access to the log
    • Some kind of message queue. I found RabbitMQ, but have no experience with such
    • Have one log for each process and merge them before analysis

    Any other idea?

    -- thanks, Roman