in reply to Writing to one file from multiple processes

I'd go with Log::Log4perl and Log::Log4perl::Appender::Synchronized.

That may be too much for smaller programs which are supposed to be easily distributable without automatic dependency checking, but it seems yours is not one of those.

  • Comment on Re: Writing to one file from multiple processes

Replies are listed 'Best First'.
Re^2: Writing to one file from multiple processes
by KianTern (Acolyte) on Mar 06, 2008 at 10:58 UTC
    Thanks for the answers,
    I guess I'll stick with multiple files for now.
    Any way this is a temporary logging system, which I'll be moving it to SQLite soon.
    I just thought if there is a fast and easy solution to this, I'll use it.
    But it seems, it's better to start developing the SQLite solution.
      Actually, that is a very good reason to go for Log::Log4perl from the begining. Switching from file-logging to database logging later is then a snap. As is adding e-mail notification , and so on.