----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

The issues involve non atomic operations and the problems that occur
when you assume they are atomic.  It's a really bad idea but hey what
the hell they're your logs.

As I'm sure others have pointed out you need to change file descriptors
so that data will be logged to your new file.  

On 20 Jul, Chris Roberts wrote:
> ----------------------------------------------------------------
> BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
> WHEN YOU POST, include all relevant version numbers, log files,
> and configuration files.  Don't make us guess your problem!!!
> ----------------------------------------------------------------
> 
> 
> As Tom Cruise once said...."Sometimes you've got to say What the heck"
> 
> Live a little...
> 
> Where are the tissues?
> 
>> Even if it does work, on a server under heavy load, there will be times
>> between when you start the copy, and then clear the file that other
>> stuff  is written to the file that never makes it through because it
>> just got overwritten by the cat /dev/null .....
> 
> It's better than Jserv going down for 100ms.....or patching the code.
> 
> But seriously....if it's a real prob...then lock the file for writing prior
> to copy and cat, and release on completion. Perl/C/J etc can do it.
> 
> 
> -----------------------------------------------------
> Click here for Free Video!!
> http://www.gohip.com/free_video/
> 
> ----- Original Message -----
> From: Chris Cheshire <[EMAIL PROTECTED]>
> To: Java Apache Users <[EMAIL PROTECTED]>
> Sent: Wednesday, July 19, 2000 6:11 PM
> Subject: Re: Fwd: Re: rolling the log files
> 
> 
>> ----------------------------------------------------------------
>> BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
>> WHEN YOU POST, include all relevant version numbers, log files,
>> and configuration files.  Don't make us guess your problem!!!
>> ----------------------------------------------------------------
>>
>> Even if it does work, on a server under heavy load, there will be times
>> between when you start the copy, and then clear the file that other
>> stuff
>> is written to the file that never makes it through because it
>> just got overwritten by the cat /dev/null .....
>>
>> Chris Roberts wrote:
>> >
>> > ----------------------------------------------------------------
>> > BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
>> > WHEN YOU POST, include all relevant version numbers, log files,
>> > and configuration files.  Don't make us guess your problem!!!
>> > ----------------------------------------------------------------
>> >
>> > Script Process:
>> >
>> > 1. cp file to new archive file
>> > 2. cat /dev/null > file - clears the file.
>> >
>> > No need to restart server - no fuss.
>> >
>> > Never done it myself...but 'ave a go mate.
>> >
>> > PS: maybe unix only soln.
>> >




--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search Archives: 
<http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to