----------------------------------------------------------------
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.
> 
> >From: Sean Peck <[EMAIL PROTECTED]>
> >Reply-To: "Java Apache Users" <[EMAIL PROTECTED]>
> >To: Java Apache Users <[EMAIL PROTECTED]>
> >Subject: Re: rolling the log files
> >Date: Wed, 19 Jul 2000 11:07:40 -0400
> >
> >----------------------------------------------------------------
> >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!!!
> >----------------------------------------------------------------
> >
> >Actually NO program likes this,  the progam when started has the file
> >descriptor to
> >its log file.  If that file is destroyed, the descriptor still exists
> >inside the
> >program and it will continue to write to that file (It doesn't care what
> >the name is)
> >If you rename the file (mv) it will write to the renamed, because at the OS
> >level it
> >is still the same file.
> >
> >If you want to rotate the logs, without restarting the server must somehow
> >know that
> >it should stop writing to the descriptor it has, and open a new one. This
> >can be done
> >in numberous ways, the source code of the logging system can be set up to
> >rotate
> >automatically when the log file gets too big, it can be set up to do it at
> >a certain
> >time/day, it can be programmed to do it on a SIGNAL or it could execute the
> >log roll
> >by some other triggering event.
> >
> >If you don't want to muck with the source code, but want to auto rotate,
> >you should
> >write a wrapper script that stops the server, moves the log and then starts
> >the server
> >again.  It is not an elegant approach, but it will work.  And make this
> >script a cron
> >job.  If the server serializes session info on shutdown and reads it in on
> >startup,
> >(Don't know if Jserv does this) it would be relatively invisible to the
> >user, except
> >for the unable to connects that would happen during the time the server was
> >restarting.
> >
> >
> >      Just some thoughts.
> >
> >       Sean
> >
> >
> >
> > > ----------------------------------------------------------------
> > > 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!!!
> > > ----------------------------------------------------------------
> > >
> > > I think the point was that JServ doesn't like you taking the
> > > logfile out from under it.  It won't reopen() the log file
> > > and start again once you rotate without restarting it.
> > >
> > >                 JWR
> > >
> > > On Tue, Jul 18, 2000 at 04:48:38PM -0700, Michael Amster said:
> > > --> ----------------------------------------------------------------
> > > --> 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!!!
> > > --> ----------------------------------------------------------------
> > > -->
> > > --> Warning- minimal JServ content below...
> > > -->
> > > --> If you are on a RedHat linux system, you can use the logrotate
> >facility - this
> > > --> provides an easy way to get what you need with minimal coding and
> >interruption
> > > --> to the running site.  There are also a good set of log management
> >tools
> > > --> available from Dan Bernstein (of qmail fame):
> >http://cr.yp.to/daemontools.html
> > > -->
> > > --> -MA
> > > -->
> > > --> Jon Stevens 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!!!
> > > --> > ----------------------------------------------------------------
> > > --> >
> > > --> > on 7/18/2000 2:09 PM, "Chris Cheshire" <[EMAIL PROTECTED]>
> >wrote:
> > > --> >
> > > --> > > Is there any way to use cronolog (or something similar) to
> >automate the
> > > --> > > rolling of the jserv.log and mod_jserv.log files? I really don't
> >want to
> > > --> > > implement something that stops the web server just to rename the
> >files.
> > > --> >
> > > --> > You have the source code to JServ, implement this feature.
> > > --> >
> > > --> > -jon
> > > --> >
> > > --> > --
> > > --> > --------------------------------------------------------------
> > > --> > 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]
> > > -->
> > > --> --
> > > --> ~-~-~-~-~-~-~-~-~-~-~-~-~-~-WEBEASY-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
> > > --> Michael Amster              [EMAIL PROTECTED]
> > > --> 1416 2nd Street             Tel: 310.576.0770
> > > --> Santa Monica, CA 90405      Fax: 310.576.2011
> > > -->
> > > -->
> > > -->
> > > -->
> > > --> --
> > > --> --------------------------------------------------------------
> > > --> 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]
> > > -->
> > >
> > > --
> > >
> >+---------------------------------------------------+----------------------+
> > > | Jonathon W. Ross                                  | Web:
> >www.isa.net.au |
> > > | Systems Administrator                             | Tel: +61 2 6230
> >4444 |
> > > | Internet Solutions Australia Pty Ltd              | Fax: +61 2 6230
> >4455 |
> > > | Wholly Owned Subsidiary of Ramsgate Resources Ltd | ACN:     086 692
> >211 |
> > >
> >+---------------------------------------------------+----------------------+
> > >
> > > --
> > > --------------------------------------------------------------
> > > 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]
> >
> >
> >
> >--
> >--------------------------------------------------------------
> >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]
> >
> 
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
> 
> --
> --------------------------------------------------------------
> 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]

-- 
Chris Cheshire
Manager of Software Development
bigredwire.com
Phone : +1 805 560 6666 (w)
        +1 805 559 9166 (m)
Fax :   +1 805 560 8901
Email : [EMAIL PROTECTED]

   Real Programmers don't draw flowcharts. 
   Flowcharts are the illiterate's form of 
   documentation. Cavemen drew flowcharts; 
   look at how much good it did for them


--
--------------------------------------------------------------
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