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.

Reply via email to