Tobias,

I my opinion what you are doing is maybe mixing two issues that should be kept 
separate:

        The generation of events
        The storages of such events in an underlying storage mechanism  
        The operational use of events in a GUI

Maybe you should consider using a database appender and have the GUI query your 
database according to the operational needs of the GUI operator where time 
would be part of the query.

/Geir

-----Original Message-----
From: Habermann, Tobias [mailto:[email protected]] 
Sent: 11. desember 2009 15:00
To: [email protected]
Subject: RollingFileAppender but keeping some data

Hi
I am using log4j in a Controlsystem GUI to log different hardware states (e.g. 
temperatures, pressure, etc.). The user needs to have access to = the data from 
the last 4 days always. To display the data I read it from = the logfiles. 
Right now I use a simple FileAppender. But after some time = the files get very 
big. I would like to have something like a = RollingFileAppender that archives 
the log file but instead of starting a = new File, it should always keep the 
data from the last 4 days in the file.=20 Maybe I should mention that I am not 
a java expert.=20 Is there a simple way to implement this?=20 Should I 
overwrite the RollingFileAppender.rollOver() ?
Or should I stay with the FileAppender and write an independent class = that 
opens the logfile and removes any entries that are older than 4 = days?


Regards
Tobias Habermann

-- 
GSI Helmholtzzentrum für Schwerionenforschung GmbH
Planckstraße 1
D-64291 Darmstadt
www.gsi.de
Gesellschaft mit beschränkter Haftung
Sitz der Gesellschaft: Darmstadt
Handelsregister: Amtsgericht Darmstadt, HRB 1528

Geschäftsführung: Professor Dr. Dr. h.c. Horst Stöcker, Christiane Neumann

Vorsitzende des Aufsichtsrates: Dr. Beatrix Vierkorn-Rudolph
Stellvertreter: Ministerialdirigent Dr. Rolf Bernhardt



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



**************************************************************************************The
 contents of this e-mail message and any attachments are confidential and are 
intended solely for the addressee. If you have received this transmission in 
error, please immediately notify the sender by return e-mail and delete this 
message and its attachments. Any unauthorized use, copying or dissemination of 
this transmission is prohibited. Neither the confidentiality nor the integrity 
of this message can be vouched for following transmission on the 
Internet.**************************************************************************************



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to