3

I want to know if there's something already done, an ext library to do such thing?
I need the logger to be redirected to a StringBuffer for then ALL that text to be included in a database record as a message.
First of all, is that a good practice??
What I'm doing now is using a new Appender class and having that StringBuffer object, then retrieving and storing.

Thanks in advance!

4

2 回答 2

0

自定义 log4j appender 是您的案例,它对 SLF4J 是透明的。

于 2011-02-26T14:10:14.353 回答
0

我有完全相同的问题,并在某个时候写了自己的问题https://github.com/artgo/stringbuffer-logger

于 2013-04-28T02:55:54.893 回答