Rory Mcguire Wrote:
>
> Surely all programs that have logging use the GC extensively? I have had a
> problem with Java and log4j where the entire heap gets used up and its
> mostly because of unfreed concatenation of strings for logging e.g.:
> logger.info("connection from"~ socket.remoteAddress());
I would certainly hope not. Loggers shouldn't allocate any memory at all,
except perhaps the occasional buffer increase if they're doing something
tricky. I can't believe anyone would create a logger that expected the user to
perform string concatenation for formatted output. Then again, the Java
standard library churns through memory like a Tasmanian Devil on an eating
binge, so perhaps I shouldn't be terribly surprised.