• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Log issue of Tomcat 6.0.26

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

Hope everyone is well.

I am doing a tomcat upgrade right now, i met 3 issues so far for the tomcat6's log.

1. How to define the log format in the generated log, like catalina_log, i want the content is exact what i want. previously we use the tomcat4, and the log content is like below, what can i do to make the newly generated log has the same content as below?

2010-04-19 09:21:10 Ajp13Connector[8009] Opening server socket on all host IP addresses
2010-04-19 09:21:10 Ajp13Connector[8009] Starting background thread
2010-04-19 09:21:11 Ajp13Processor[8009][0] Starting background thread
2010-04-19 09:21:11 Ajp13Processor[8009][1] Starting background thread
2010-04-19 09:21:11 Ajp13Processor[8009][2] Starting background thread
2010-04-19 09:21:11 Ajp13Processor[8009][3] Starting background thread
2010-04-19 09:21:11 Ajp13Processor[8009][4] Starting background thread
2010-04-19 09:54:59 Ajp13Connector[8009] Opening server socket on all host IP addresses
2010-04-19 09:54:59 Ajp13Connector[8009] Starting background thread
2010-04-19 09:54:59 Ajp13Processor[8009][0] Starting background thread


2. I want to generate one more log for my own application log which is used to record some useful information of our web application, how can i do that?

this is very critical for me, hope someone can help me out. Really appreciate for your help.

Thanks,
Johnny
 
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat 6 uses Jakarta Commons Logging (JCL)framework for logging. You can modify logging.properties in conf to control the log format.

For your application logging (as I understand from your post), you can use popular log4j framework.
 
Johnny Tong
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi manoj,

thanks for your help.

So do you mean the logging.properties in conf is only to control the log format ? and our application log is just like catalina log, should be put the tomcat log folder, meanwhile, we can not use the log4j in our condition, so is there any other way i can do to generate one more log?(like modify some properties file)?

thanks,
Johnny
 
Bartender
Posts: 20982
128
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The documentation on Tomcat logging is very confusing. It actually is about how to make changes to how Tomcat logs itself. And only where Tomcat logs itself.

Applications are responsible for their own logging setups, including selecting where the logfiles will be written.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Johnny,

did you figure out how to get this information logged. We are having exactly the same problem, but have not yet figured out how to configure the new Tomcat 6 logging setup so that it logs the number of threads handling http requests.


Thanks

Steph
 
Normally trees don't drive trucks. Does this tiny ad have a license?
Enterprise-grade Excel API for Java
https://products.aspose.com/cells/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!