"fast" and "failure-proof" are to a certain extent mutually exclusive.
If you want to be absolutely sre about your logging, than the log record
has to be written as part of the same transaction in which the event being
logged is executed. The ACID semantics of transactions ensure that 
the log and the action are either atomically executed, or not at all.

Practically this is most easily achieved using databases. Since this is
not acceptable to you, my advise would be to develop you own Log4J
appender that logs a message to two files (on two different disks) and
flushes after every write...

++Jos.es

And thus it came to pass that costin wrote:
(on Mon, Mar 24, 2003 at 11:54:49AM +0200 to be exact)

>   Hi!
> 
>   I`ve approached this subject before on the list but I haven`t found
>   any satisfactory responses.
> 
>   I have an application where logging is a HUGE priority. The usual
>   e-commerce one, where every "action" has to be logged. Now my
>   problem is this one.
> 
>   Logging has to be fast and most importantly failure-proof - (meaning
>   that it will survive a power crash or any similar event - EJB alike).
> 
>   Now, the log4j suite is very flexible and elegant but I haven`t
>   found any failure-proof proprieties. There is no guarantee that the
>   logging will succeed if the power/network or what ever goes down.
> 
>   Makeing an EJB and logging everything in a database is not an option
>   even though it has one of the propriety I`m looking for.
> 
>   I imagine that this is not an unsual problem and there have to be
>   solutions to it. Can anyone give me a clue or point me to some
>   resource...
> 
> 
> --
> Thanks,
>  costin          
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user

-- 
I have my fears, but they don't have me...



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to