Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Stop tomcat from throwing exceptions

Posted on 2004-09-30
7
Medium Priority
?
218 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 53

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 53

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
Supports up to 4K resolution!

The VS192 2-Port 4K DisplayPort Splitter is perfect for anyone who needs to send one source of DisplayPort high definition video to two or four DisplayPort displays. The VS192 can split and also expand DisplayPort audio/video signal on two or four DisplayPort monitors.

 
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 2000 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

Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

Question has a verified solution.

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

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.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

715 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