Solved

Stop tomcat from throwing exceptions

Posted on 2004-09-30
7
215 Views
Last Modified: 2010-03-17
hi experts,

When I start tomcat, i can see many exceptions being printed on the console. Instead of displaying on screen, i want to log them in a log file.

Thanks,
0
Comment
Question by:kumvjuec
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 51

Expert Comment

by:Ryan Chong
ID: 12264811
Try check the <Logger> tag in server.xml file of tomcat.

at:

<Logger className="org.apache.catalina.logger.FileLogger"
                 directory="logs"  prefix="localhost_log." suffix=".txt"
              timestamp="true"/>

and edit the directory there..

More info:
Changing the location of Tomcat log files
http:Q_21122096.html

Logging in Tomcat
http:Q_20269918.html
0
 
LVL 51

Expert Comment

by:Ryan Chong
ID: 12264821
the server.xml file is usually located at:

<Tomcat Home>\conf
0
 
LVL 3

Author Comment

by:kumvjuec
ID: 12274033
I have looked at it. But still, the exceptions are still there. I am startting Tomcat from commandline and exceptions print there on console. I watn to prevent them.

Thanks,
0
Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

 
LVL 1

Expert Comment

by:deleteguy
ID: 12310527
hey

what are the exceptions. is tomcat generating it.
are you deployign any application on it too?

you should reinstall tomcat to try this.
0
 
LVL 3

Author Comment

by:kumvjuec
ID: 12310838
Ohh, I tried this but still the exceptions print. I think my appplication must be throwing them.
The exceptions are java.net.NetException
0
 
LVL 1

Accepted Solution

by:
deleteguy earned 500 total points
ID: 12310872
see any code in the catch blocks where you may be printing them using printstacktrace etc. remove that code and make use of logger. one such logger is provided by apache itse;f. you see the javadoc s for it
btw, if this solves your prob then this was not the proper place for this q ;-)
0
 
LVL 3

Author Comment

by:kumvjuec
ID: 12316570
Ok, It never occured to me that the solution lies in modifying ythe code.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
websphere tutorial sites? 6 201
weblogic server 10.3.0 download 2 502
How To Build A Makeshift Production Studio 29 150
Application whitelisting vs executable change 3 124
Convert websphere application server default chained Certificates from 1024 to 2048 keysize or higher size and also you can change signatureAlgorithm . Please make sure Websphere Application Server fixpack 7.0.0.23 or Above. The following steps a…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question