Solved

Stop tomcat from throwing exceptions

Posted on 2004-09-30
7
216 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 52

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 52

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
Building an interactive eFuture classroom

Watch and learn how ATEN provided a total control system solution including seamless switching matrix switch, HDBaseT extenders, PDU, lighting control to build an interactive eFuture classroom.

 
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

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
IT Department Standard document 2 52
Diagramming an Application for Work 3 133
wmware 10 343
Problem to run application 1 74
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…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Suggested Courses

739 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