• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

logs generated

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

i have a production application which uses Apache tomcat (version 4) as the application server.

Recently the application unexpectedly crashes with no particular and helpful logs generated. I want to know if it is possible for me to increase the logging that is currently happening??

please help.
 
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
Howdy Paridhi Gupta ,

Welcome to JavaRanch

Originally posted by Paridhi Gupta:
..Recently the application unexpectedly crashes with no particular and helpful logs generated. I want to know if it is possible for me to increase the logging that is currently happening??



Yes, you can very well do it.

1. First check whether the application does have some logging already in place. Being in production it is expected to have a logging. In such case, try to fine tune the level of logging. Say in case of the levels being set to 'error' or 'warn', you can set it to 'debug' and restart the server/application so as to have the change the applicable.

You can do this by editing the appropriate logger properties file. The name of the property file may vary as per the business requirements. But try searching for "*.properties" with "log" in the name. It may help!

2. If the application does not have the logging unfortunately, you may have to introduce. Its more or less like having a System.out.println() statements in your Java code, but you do it with Logger and its anonymous method would be log().

One advantage you get with Loggers instead of SOPs is you have a better control on the level of logging as explained in the para #1.

You can go for Log4j, JDK Logging etc., based on your convenience.

Hope this helps!
[ April 09, 2008: Message edited by: Raghavan Muthu ]
 
Paridhi Gupta
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Raghavan for the detailed response.

Originally posted by Raghavan Muthu:
First check whether the application does have some logging already in place. Being in production it is expected to have a logging. In such case, try to fine tune the level of logging. Say in case of the levels being set to 'error' or 'warn', you can set it to 'debug' and restart the server/application so as to have the change the applicable.



there is one problem that I am having. Since the application that is running on Tomcat is Documentum, it itself has a number of logging files. Can you tell me if the tomcat log properties file will be in which folder path?
I already have the stderr log file being formed, but the logging is not sufficient and I want to increase it.
Can you please guide me further on this?
 
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

Originally posted by Paridhi Gupta:
there is one problem that I am having. Since the application that is running
on Tomcat is Documentum, it itself has a number of logging files.



I think you are mistaken. Yes, Tomcat is also being an application basically it will have its own logging on its activities like when it is deploying and undeploying an application, binding the resources etc., It is all on its own tasks like what your user developed application is expected to do. You don't need to confuse with them.


Can you tell me if the tomcat log properties file will be in which folder path?



As i told you, it may not be of much use. But still it depends on the version you use. I am not very sure of its location in Tomcat 4 and its been sometime i worked on it. Let me check and get back.


I already have the stderr log file being formed, but the logging is not sufficient and I want to increase it.
Can you please guide me further on this?



It looks like you are willing to know about your *application* logging and NOT the tomcat's logging. Do you have access to source code? If so, try looking at the log/debug statements and how they are carried out. I am sure they might not have been with plain SOPs.

Anyways, did you try searching for some .properties file?
 
Paridhi Gupta
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Raghavan Muthu:


It looks like you are willing to know about your *application* logging and NOT the tomcat's logging. Do you have access to source code? If so, try looking at the log/debug statements and how they are carried out. I am sure they might not have been with plain SOPs.

Anyways, did you try searching for some .properties file?



oh..ok! that was quite ignorant of me. So this means that stderr logs are application related logs and there are other tomcat logs

Now I did try and search for all properties files which had "log" in its name, the search resulted in no. of files most of which were located in the application related folder under webapps. That is why I asked if any idea where these tomcat logs path maybe??
My problem is that the tomcat of my PROD application sometimes just crashes unexpectedly, so I suppose only tomcat logs will help right?!!?? Whatever logging is happening in stderr anyways isnt much helpful. Can i somehow increase that also?
 
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

Originally posted by Paridhi Gupta:
oh..ok! that was quite ignorant of me. So this means that stderr logs are application related logs and there are other tomcat logs



Yes thats correct! But i meant to say with your intention of your 'increasing' the logs with respect to your application, which has got nothing to do with Tomcat's logs.


Now I did try and search for all properties files which had "log" in its name, the search resulted in no. of files most of which were located in the application related folder under webapps.



That means there are some properties file which your application makes use of. did you open and see any of those? Do you see anything like log4j.properties? If it is the case, it uses log4j and the filename was left unmodified. Just have a look around.


That is why I asked if any idea where these tomcat logs path maybe??



Ideally speaking the logs are placed generally inside 'logs' folder in the containers/servers.


My problem is that the tomcat of my PROD application sometimes just crashes unexpectedly, so I suppose only tomcat logs will help right?!!?? Whatever logging is happening in stderr anyways isnt much helpful. Can i somehow increase that also?



The application could crash because of memory mainly. What exactly the information you got to know in the logs you saw? Yes, the logging level can be fine tuned as Tomcat also should make use of JDK Logging and you can find a file name logging.properties inside the conf folder of your TOMCAT_INSTALLATION_DIR (where you installed Tomcat).

But make sure you are aware of what you are doing and try to take a backup before you just do the change -- for a safety measure as you are dealing with a production system.

Also be aware that it requires a container restart for any changes done on the configuration files (here the .properties file).
 
When evil is afoot and you don't have any arms you gotta be hip and do the legwork, but always kick some ... tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic