Solved

suppressing startup.bat of Tomcat

Posted on 2014-10-03
3
333 Views
Last Modified: 2014-10-20
Hi;

I am using Tomcat 6&7 and i always start it from startup.bat and no problem at starting.

Once it starts, it echoes some lines to console which is fine again.

The issue is that my code causes some lines on the console in the end which i want to suppress. How can i suppress those lines?

Regards.
0
Comment
Question by:jazzIIIlove
  • 2
3 Comments
 

Expert Comment

by:ashok choudhary
ID: 40367826
You need to update your log4j.properties file
and use loggers in you code.
0
 

Accepted Solution

by:
ashok choudhary earned 250 total points
ID: 40367841
Or in Tomcat /conf /logging.properties

Edit conf/logging.properties and change the line

.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
to

.handlers = 1catalina.org.apache.juli.FileHandler
Then it will only log to catalina..log, not to the console.
0
 
LVL 37

Assisted Solution

by:Gerwin Jansen
Gerwin Jansen earned 250 total points
ID: 40369557
You could redirect the output that you're getting from the start up script like this:

startup.bat >startup_standard_output 2>startup_error_output

This way you'd get 2 files that contain the output that would normally appear on screen.

In case your code is sending output to standard error then just do this:

startup.bat 2>startup_error_output

And if you're not interested in any output:

startup.bat 2>&1 >/dev/null
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

896 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now