• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tomcat log output - SOLVED

 
Ranch Hand
Posts: 163
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

Our tomcat administrator has left us not too long ago, and now I'm tasked with maintaining the 5.5.17 tomcat server.

The output of the tomcat log, as specified in the log4j.properties file, is stopping at a certain point in the morning. The application runs continuously throughout the day and the output has always been steady. This started two weeks ago and I'm baffled.

It's not hurting the application as it runs fine. It's just that I rely on the log for debugging and testing.

Any advice you can give me is greatly appreciated.

Bill Clar
[ October 04, 2007: Message edited by: Bill Clar ]
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you using a rollingFileAppender?
If so, could it be that a new file is started at the same point the the first one stops receiving logging information?
 
Bill Clar
Ranch Hand
Posts: 163
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe so. I found this snippet in the log4j.properties file:

#
# Configuration for a rolling log file ("tomcat.log").
#
log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
log4j.appender.R.DatePattern='.'yyyy-MM-dd
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By any chance, does it stop logging at midnight?
 
Bill Clar
Ranch Hand
Posts: 163
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, the server reboots at 4:00 am. We have logs from 4:00 am to 8:30 am, then nothing.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
With log4j, it's possible to change your logging levels at run time from within your program.

I'm wondering if someone wrote something that turns the logging levels up a 4:00 AM to debug some type of batch process and then, with the best of intentions, set it to turn the logging off when this process is done.

Do you know of any code in your application that does something automatically every morning?
 
Bill Clar
Ranch Hand
Posts: 163
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm afraid that we don't utilize the log4j to our fullest advantage in that we don't utilize the debugging levels. All of our output comes from System.out.println(). It's not the best approach, but we have little time for refactoring at the moment.

All automated processes run at night, after hours. The output from those processes are piped to the default log of catalina.out without any problem.

I appreciate your help, Ben.

I'm going to consult with my system administrator and see if it could be a disk space or memory issue. Upgrading our version of Tomcat is another option.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you have access to source code, you might also want to grep for "setLevel".
You might find that something within your app is changing the levels without you knowing about it.
 
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I also agree with Ben. Perhaps, by looking into the code for the configuration changes would help a bit.
 
Bill Clar
Ranch Hand
Posts: 163
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found the problem. The JReport log was interfering and piping the tomcat output into it.

Thanks for the help!

Bill Clar
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bill, thank you for posting back with the solution.
 
Raghavan Muthu
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's very true Ben. Thanks Bill for posting back the solution as it may help others with the relevant question.
 
reply
    Bookmark Topic Watch Topic
  • New Topic