I\'m developing a web app, and I\'d like to log some information to help me improve and observe the app. (I\'m using Tomcat6)
First I thought I would use StringBuild
If performance is really a concern have a look for slf4j: http://www.slf4j.org/manual.html
With their placeholder approach they are faster than log4j when you disabled logging those messages, because in log4j the string concatenation takes places independently the message is really needed. Slf4j only replaces the placeholder if this message will be really logged.
But you can do something like this in log4j:
if(l.isDebugEnabled()) l.debug("log entry: " + 7);
But i think it's a lot of boilerplate-code so i am using slf4j