Re: log4j and log file lock?



On Aug 15, 2:25 pm, alejandrina <apat...@xxxxxxxxx> wrote:
Hi all,

We have a processor farm (currently 8 machines) running the same
application with different input parameters. We use log4j to record
interesting stuff; we'd like to use a single log file in a networked
disk. We noticed that the 8 machines are trampling on each other as
they write to the log file (symptoms are nulls embedded in messages,
incomplete messages, duplicate messages....). I have assumed that this
is because access to the log file is not "locked" (using something
like Java's FileLock API).

Is there a solution to this problem? Thread syncronization is not an
option, of course, as these are different computers.

Thanks for any ideas,

Alejandrina

Use the syslog appender and let a single network-available syslog
instance handle the actual log files.

-Owen

.



Relevant Pages

  • log4j and log file lock?
    ... We have a processor farm (currently 8 machines) running the same ... We use log4j to record ... we'd like to use a single log file in a networked ... incomplete messages, duplicate messages....). ...
    (comp.lang.java.programmer)
  • Re: Called ServiceBase.Run(), but never receive OnStart()?
    ... settings, most important of which for our purposes is the name of the ... On the machines where this works, I see, in the logfile, the two ... Write a startup message to the log file. ... But you are reading from the registry before you are actually writing to the log file, what's important is to know the time you entered Main and the time at which you are calling Run, the difference between those may not exceed 30 seconds. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Errors Message from Webtrends Firewall Suite
    ... Firewall Suite and Firewall Appliance Analyzer keep track of how many ... records in the log file were dropped due to being out of chronological ... The reason it takes more memory is because whatever setting is entered ... One cause could be when multiple machines record to one log, ...
    (comp.security.firewalls)
  • FOR command question
    ... windows 2000 and XP machines fill in these fields fine however my NT4 ... I use the 'find' and 'for' commands on this log file a lot. ... so my tokens don't get off? ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: log4j and log file lock?
    ... We have a processor farm (currently 8 machines) running the same ... We use log4j to record ... we'd like to use a single log file in a networked ... which, if faster than the network ...
    (comp.lang.java.programmer)