logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henry Zhou" <zhoujia...@gmail.com>
Subject An issue when log4j logs into the database
Date Fri, 14 Sep 2007 14:48:25 GMT
Hi all,

I have actually implemented my own HibernateAppender which sends output
event to the database via using Hibernate3. So far, everything looks fine.
The log can be persisted into the database with a buffer function. However
there is still a tough performance issue left with this topic and I want
some ideas from your experts. See the following requirements.

Requirements: I want to implement such a algorithm that, when the upper
limit of the event has reached, then new events will overwrite the existing
events. By upper limit, I mean to limit the amount of the events each user
can log into the database. (Let's assume that each user who connected to my
application can log only 1,000  events) Otherwise, the event table will be
ended up bloody big. (Something similar to the Maximum file size if a
RollingFileAppender is used).

Issus: I need a decent algorithm to deal with such a scenario when the upper
limit is reached. How to overwrite the existing records in the database?

I am not a database expert so can anybody give me some idea?

Regards,
Jiafan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message