This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java 5 logging in JSPs and Tomcat  RSS feed

Luanne Misquitta
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I'm using Java logging in my jsps running in a Tomcat container. However, I find that locks are not released soon enough and the number of log files quickly grows to 100 and stops (that's the max locks). The size of the log files is just 1 or 2 KB. Is there a way to control this?
I am using it this way:

Logger logger = Logger.getLogger("AjaxLogger");

Handler ajaxLog = null;
try {
ajaxLog = new FileHandler("%t/ajax%u.%g.log",true);
catch (IOException ioe) {
logger.severe("Could not create ajax log");
if (ajaxLog != null) {
String logMsg=request.getParameter("logMsg");
if(logMsg!=null) {;


  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!