You could make your own appender and add the info there or make your
own layout class to add support for including it in the output.

On 1/4/07, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
Hi,

I'm searching for a solution to add the memory usage of the java virtual 
machine to every log4j entry. At the moment I can access only manually the 
memory usage with the help of:

double free =  Runtime.getRuntime().freeMemory() / 1024d / 1024d;
double max =  Runtime.getRuntime().maxMemory() / 1024d / 1024d;
double total =  Runtime.getRuntime().totalMemory() / 1024d / 1024d;

I'm using the logger at many different positions so it would be a very bad 
solution to add these values every time manually to the logger-output. Is it 
possible to add these values automatically to every logger-output?

--C.P.




--
James Stauffer        http://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to