avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernhard Huber" <bh22...@i-one.at>
Subject Re: AW: LogKit - FileRotation
Date Tue, 14 Aug 2001 19:51:37 GMT
Hi
variance of between what?
Between 1,503 and 1,502 I don't know.

1)Testcase: testSizeRotationUniqueFilename took 1,503 sec
1)Testcase: testSizeRotationRevolingFilename took 1,502 sec
2)Testcase: testTimeRotationUniqueFilename took 10,004 sec
2)Testcase: testTimeRotationRevolvingFilename took 10,005 sec

Between 1,503 and 10,004, and
between 1,502 and 10,005 is due to writing 10 time more
data in the later case.

Just one point, in the revolving case first a unique-filename
is written, as openFile() is called to early.
I have not fixed that, yet, perhaps I can do it before the weekend...

I'm doing some more tests as you asked me about variance,
and now I have following results:
Testsuite: org.apache.log.output.test.TestRotatingFileOutputLogTarget
Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 33,489 sec

------------- Standard Output ---------------
File(s) testSizeRotationUniqueFilename.log written: 2270065
File(s) testSizeRotationRevolingFilename.log written: 2271565
File(s) testTimeRotationUniqueFilename.log written: 15089260
File(s) testTimeRotationRevolingFilename.log written: 14864390
File(s) testTimeRotationRevolvingFilenameCycles.log written: 15181155
------------- ---------------- ---------------
Testcase: testSizeRotationUniqueFilename took 1,863 sec
Testcase: testSizeRotationRevolingFilename took 1,602 sec
Testcase: testTimeRotationUniqueFilename took 10,005 sec
Testcase: testTimeRotationRevolvingFilename took 10,004 sec
Testcase: testTimeRotationRevolvingFilenameCycles took 10,005 sec

What's strange the diff between 1,863 and 1,602

bye


----- Originalnachricht -----
Von: Peter Donald <donaldp@apache.org>
Datum: Dienstag, August 14, 2001 5:06 am
Betreff: Re: AW: LogKit - FileRotation

> Excellent .. I will add it in next time I get a chance to hack 
> (prolly on the 
> weekend) - thanks.
> 
> On Tue, 14 Aug 2001 05:38, Bernhard Huber wrote:
> > I have adapted LogRotation to LogKit-1.0b4.
> > If some needs it, added JunitTest, too.
> >
> > ----- Originalnachricht -----
> > Von: "Bernhard Huber" <bh22351@i-one.at>
> > Datum: Montag, August 13, 2001 8:45 pm
> > Betreff: Re: AW: LogKit - FileRotation
> >
> > > FYI, same test with LogKit-1.0b4
> > > Testsuite: 
> org.apache.log.output.test.TestRotatingFileOutputLogTarget> > 
> Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 23,024 sec
> > >
> > > Testcase: testSizeRotationUniqueFilename took 1,503 sec
> > > Testcase: testSizeRotationRevolingFilename took 1,502 sec
> > > Testcase: testTimeRotationUniqueFilename took 10,004 sec
> > > Testcase: testTimeRotationRevolvingFilename took 10,005 sec
> > >
> > > ----- Originalnachricht -----
> > > Von: "Bernhard Huber" <bh22351@i-one.at>
> > > Datum: Montag, August 13, 2001 6:07 pm
> > > Betreff: Re: AW: LogKit - FileRotation
> > >
> > > > Hi
> > > > About file-size, I just sum up the message-length using
> > > > String.length(),that's not 100% exact. As I'm not counting the
> > >
> > > bytes.> I don't think that it neccessary to read the file size
> > > from the file.
> > >
> > > > About speed I was testing WIN2k
> > > > Writing totally  45 File(s)     51.241.655 bytes
> > > > Testsuite: prantnik.test.log.TestRotatingFileOutputLogTarget
> > > > Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 22,592 sec
> > > >
> > > > Testcase: testSizeRotationUniqueFilename took 1,372 sec,
> > > > writing:  18 File(s)      2.357.165 bytes
> > > >
> > > > Testcase: testSizeRotationRevolingFilename took 1,202 sec
> > > > writing:  18 File(s)      2.358.725 bytes
> > > >
> > > > Testcase: testTimeRotationUniqueFilename took 10,014 sec
> > > > writing: 4 File(s)     23.577.710 bytes
> > > >
> > > > Testcase: testTimeRotationRevolvingFilename took 10,004 sec
> > > > writing: 4 File(s)     22.948.055 bytes
> > > >
> > > > ----- Originalnachricht -----
> > > > Von: "Carsten Ziegeler" <cziegeler@sundn.de>
> > > > Datum: Montag, August 13, 2001 4:57 pm
> > > > Betreff: AW: LogKit - FileRotation
> > > >
> > > > > > Peter Donald wrote:
> > > > > >
> > > > > > On Tue, 14 Aug 2001 00:03, Carsten Ziegeler wrote:
> > > > > > > > Peter Donald wrote:
> > > > > > > >
> > > > > > > > On Mon, 13 Aug 2001 23:19, Carsten Ziegeler wrote:
> > > > > > > > > On what basis does the rotation work? File size
or 
> date?> > > > > > >
> > > > > > > > Both or either ;) I used an
> > > > > > > >
> > > > > > > > interface RollCondition
> > > > > > > > {
> > > > > > > >   boolean roll( LogEvent event, File file );
> > > > > > > > }
> > > > > > > >
> > > > > > > > that allowed you to select the conditions under which
> > >
> > > you
> > >
> > > > roll.> > > >
> > > >
> > > > > > > > > I wrote yesterday (!)
> > > > > > > >
> > > > > > > > eek ! It must be the season for it ;)
> > > > > > > >
> > > > > > > > > a simple FileTarget which combines
> > > > > > > > > both attempts, e.g. the usual rotation is done
by 
> date:> > > > > > > > Using a configuration a backup is created
at 
> the beginning
> > > > > > > > > of every hour, 12 hours or day. When during this

> period> > > > > > > > of time the size of the log gets to big
(is also
> > > > >
> > > > > configurable),> > > > it is also backuped and a new log
is
> > >
> > > created.> > > > > >
> > >
> > > > > > > > > Perhaps we could join forces here?
> > > > > > > >
> > > > > > > > Abvsolutely. The other thing I started to implement
was
> > >
> > > an
> > >
> > > > > > interface like
> > > > > >
> > > > > > > > interface RollStrategy
> > > > > > > > {
> > > > > > > >   File nextFile( File oldFile );
> > > > > > > > }
> > > > > > >
> > > > > > > Do you also have an interface for testing when to roll?
> > > > > >
> > > > > > Yep - see above (RollCondition)  ;)
> > > > >
> > > > > Ups...
> > > > >
> > > > > So your interfaces all depend on File objects. I am not so
> > >
> > > familiar> > with the IO behaviour of Java, but I assume that you
> > > open and close
> > >
> > > > > the file each time you write something into the log, right?
> > > > > Otherwise a RollCondition which checks the file size 
> woudn't work,
> > > > > or am I wrong here?
> > > > >
> > > > > I first implemented the target with this behaviour: opening
> > >
> > > the
> > >
> > > > file,> appending the information, closing it. But if you have
> > > > turned on
> > > >
> > > > > logging everything this will get soooo slow that I changed 
> this> > > > into using an internal byte counter.
> > > > >
> > > > > Carsten
> > > > >
> > > > > > > Carsten
> > > > > > >
> > > > > > > > Which would do the actuall rolling. So you could select
> > > >
> > > > the
> > > >
> > > > > > strategy with
> > > > > >
> > > > > > > > which you name files - ie
> > > > > > > >
> > > > > > > > my.log
> > > > > > > > my.log.1
> > > > > > > > my.log.2
> > > > > > > > my.log.3
> > > > > > > > (Files after 3rd generation are deleted)
> > > > > > > >
> > > > > > > > vs
> > > > > > > >
> > > > > > > > my.log
> > > > > > > > my.log.20010722
> > > > > > > > my.log.20010611
> > > > > > > > ...
> > > > > > > > (logs are infinite and use dates to roll)
> > > > > > > >
> > > > > > > > etc.
> > > > > > > >
> > > > > > > > So you had configurable generation count (ie number
of
> > > >
> > > > files
> > > >
> > > > > that> > > could be
> > > > >
> > > > > > > > present), format of filename etc.
> > > > > > > >
> > > > > > > > Howeverything I did was raw and untested properly
so it
> > > >
> > > > may be
> > > >
> > > > > > > > better to work
> > > > > > > > together to get once better tested system ;)
> > > > > > > >
> > > > > > > > > Carsten
> > > > > > > > >
> > > > > > > > > Open Source Group                        sunShine
-
> > > > >
> > > > > b:Integrated> > > >
> > >
> > > ================================================================>
> > >
> > > > > > > > Carsten Ziegeler, S&N AG, Klingenderstrasse 5,
D-33100
> > > >
> > > > Paderborn> > > > > www.sundn.de                       
  mailto:
> > > > > cziegeler@sundn.de> > > >
> > >
> > > ================================================================>
> > >
> > > > > > > > > > Peter Donald wrote:
> > > > > > > > > >
> > > > > > > > > > On Mon, 13 Aug 2001 22:52, Bernhard Huber
wrote:
> > > > > > > > > > > Hi
> > > > > > > > > >
> > > > > > > > > > Hi,
> > > > > > > > > >
> > > > > > > > > > > I was implementing a FileRotation for
LogKit, but
> > > >
> > > > not
> > > >
> > > > > using> > > > > > the very lattest LogKit interfaces.
> > > > >
> > > > > > > > > > kool.
> > > > > > > > > >
> > > > > > > > > > > Is there a need for this feature?
> > > > > > > > > >
> > > > > > > > > > yes very much so.
> > > > > > > > > >
> > > > > > > > > > > As I understand
> > > > > > > > > > > long running server-programs will write
big log
> > > >
> > > > files.
> > > >
> > > > > > Maybe I have
> > > > > >
> > > > > > > > > > > overseen something but FileRotation
is needed in
> > > > >
> > > > > production> > > > > > environment, or shall Cocoon2,
etc get
> > > > > restarted ever day :-) ?
> > > > >
> > > > > > > > > > I have actually implemented FileRollTarget
ages ago
> > >
> > > (a
> > >
> > > > year> > > >
> > > >
> > > > > > > > or two) but I
> > > > > > > >
> > > > > > > > > > didn't own it. I actually reimplemented
it a few
> > >
> > > days
> > >
> > > > > ago but
> > > > >
> > > > > > > > > > wasn't willing
> > > > > > > > > > to put it into CVS without more testing
.. however
> > >
> > > if you
> > >
> > > > > > > > already have a
> > > > > > > >
> > > > > > > > > > tested version .... that would be useful
;)
> > > > > > > > > >
> > > > > > > > > > Cheers,
> > > > > > > > > >
> > > > > > > > > > Pete
> > > > > > > > > >
> > > > > > > > > > *------------------------------------------------
> ----
> > >
> > > -*
> > >
> > > > > > > > > > | "Faced with the choice between changing
one's
> > >
> > > mind, |
> > >
> > > > > > > > > > | and proving that there is no need to do
so -
> > >
> > > almost |
> > >
> > > > > > > > > > | everyone gets busy on the proof."
> > > > > > > > > > |
> > > > > > > > > > |              - John Kenneth Galbraith
> > > > > > > > > >
> > > > > > > > > > *------------------------------------------------
> ----
> > >
> > > -*
> > >
> > > > > > ---------------------------------------------------------
> ----
> > >
> > > --
> > >
> > > > --
> > > >
> > > > > ----
> > > > >
> > > > > > > > > > To unsubscribe, e-mail: avalon-dev-
> > > > >
> > > > > unsubscribe@jakarta.apache.org> > > > > For additional
> > >
> > > commands,
> > >
> > > > e-
> > > >
> > > > > mail:
> > > > > > avalon-dev-help@jakarta.apache.org
> > > > > >
> > > > > >
> > > > > > ---------------------------------------------------------
> ----
> > >
> > > --
> > >
> > > > --
> > > >
> > > > > ----
> > > > >
> > > > > > > > > To unsubscribe, e-mail: avalon-dev-
> > > > >
> > > > > unsubscribe@jakarta.apache.org> > > > For additional
commands,
> > >
> > > e-
> > >
> > > > > mail: avalon-dev-help@jakarta.apache.org
> > > > >
> > > > > > > > --
> > > > > > > > Cheers,
> > > > > > > >
> > > > > > > > Pete
> > > > > > > >
> > > > > > > > *----------------------------------------------------
> -*
> > > > > > > > * "Faced with the choice between changing one's 
> mind, *
> > > > > > > > * and proving that there is no need to do so - 
> almost *
> > > > > > > > * everyone gets busy on the proof."              
   
> *
> > > > > > > > *              - John Kenneth Galbraith          
   
> *
> > > > > > > > *----------------------------------------------------
> -*
> > > > > > > >
> > > > > > > > -----------------------------------------------------
> ----
> > >
> > > --
> > >
> > > > --
> > > >
> > > > > --------
> > > > >
> > > > > > > > To unsubscribe, e-mail: avalon-dev-
> > > > >
> > > > > unsubscribe@jakarta.apache.org> > > For additional 
> commands, e-
> > > > > mail: avalon-dev-help@jakarta.apache.org
> > > > >
> > > > > > > -------------------------------------------------------
> ----
> > >
> > > --
> > >
> > > > --
> > > >
> > > > > ------
> > > > >
> > > > > > > To unsubscribe, e-mail: avalon-dev-
> > > >
> > > > unsubscribe@jakarta.apache.org> > > For additional commands,

> e-
> > > > mail: avalon-dev-
> > > >
> > > > > help@jakarta.apache.org>
> > > > >
> > > > > > --
> > > > > > Cheers,
> > > > > >
> > > > > > Pete
> > > > > >
> > > > > > *-----------------------------------------------------*
> > > > > > * "Faced with the choice between changing one's mind, *
> > > > > > * and proving that there is no need to do so - almost *
> > > > > > * everyone gets busy on the proof."                   *
> > > > > > *              - John Kenneth Galbraith               *
> > > > > > *-----------------------------------------------------*
> > > > > >
> > > > > > ---------------------------------------------------------
> ----
> > >
> > > --
> > >
> > > > --
> > > >
> > > > > ----
> > > > >
> > > > > > To unsubscribe, e-mail: avalon-dev-
> > >
> > > unsubscribe@jakarta.apache.org> > > For additional commands, e-
> > > mail: avalon-dev-
> > >
> > > > help@jakarta.apache.org> >
> > > >
> > > > > -----------------------------------------------------------
> ----
> > >
> > > --
> > >
> > > > --
> > > >
> > > > > --
> > > > > To unsubscribe, e-mail: avalon-dev-
> unsubscribe@jakarta.apache.org> > > > For additional commands, e-
> mail: avalon-dev-
> > >
> > > help@jakarta.apache.org> >
> 
> ----------------------------------------
> Content-Type: application/x-zip-compressed; charset="us-ascii"; 
> name="Attachment: 1"
> Content-Transfer-Encoding: base64
> Content-Description: 
> ----------------------------------------
> 
> ----------------------------------------
> Content-Type: text/plain; charset="us-ascii"; name="Attachment: 2"
> Content-Transfer-Encoding: 7bit
> Content-Description: 
> ----------------------------------------
> 
> ----------------------------------------
> Content-Type: text/plain; charset="us-ascii"; name="Attachment: 3"
> Content-Transfer-Encoding: 7bit
> Content-Description: 
> ----------------------------------------
> 
> ----------------------------------------
> Content-Type: text/x-vcard; charset="us-ascii"; name="bh22351.vcf"
> Content-Transfer-Encoding: 7bit
> Content-Description: Card for <bh22351@i-one.at>
> ----------------------------------------
> 
> ----------------------------------------
> Content-Type: text/plain; charset="us-ascii"; name="Attachment: 5"
> Content-Transfer-Encoding: 7bit
> Content-Description: 
> ----------------------------------------
> 
> -- 
> Cheers,
> 
> Pete
> 
> *-----------------------------------------------------*
> * "Faced with the choice between changing one's mind, *
> * and proving that there is no need to do so - almost *
> * everyone gets busy on the proof."                   *
> *              - John Kenneth Galbraith               *
> *-----------------------------------------------------*
> 
> -------------------------------------------------------------------
> --
> To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: avalon-dev-help@jakarta.apache.org
> 
> 

Mime
View raw message