tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject RE: Java Logging API and stderr.log & Tomcat as NT service
Date Wed, 30 Apr 2003 19:55:03 GMT

Follow the instructions at this link exactly and it will work.

http://www.mattkelli.com/tech/tomcat/ntservice.htm

Jake


At 11:26 AM 4/30/2003 +0100, you wrote:
>Thanks for that.
>
>My next question is how to get those options into an NT service. The windows
>executable that installed the Tomcat service didn't give me the option to
>set any of the CATALINA_OPTS. I've uninstalled my Tomcat service from the
>command line and am trying to run a batch file containing the following to
>reinstall the service:
>
>set CATALINA_HOME="C:\Program Files\Apache Group\Tomcat 4.1"
>
>set
>CATALINA_OPTS=-server -Xms128m -Xmx256m -Dorg.apache.commons.logging.Log=org
>.apache.commons.logging.impl.SimpleLog -Dorg.apache.commons.logging.simplelo
>g.defaultlog=error
>
>%CATALINA_HOME%\bin\tomcat.exe -install "Apache Tomcat"
>%JAVA_HOME%\jre\bin\server\jvm.dll -Djava.class.path=%CATALINA_HOME%\bin\boo
>tstrap.jar;%JAVA_HOME%\lib\tools.jar -Dcatalina.home=%CATALINA_HOME% -Xrs -s
>tart org.apache.catalina.startup.BootstrapService -params start -stop
>org.apache.catalina.startup.BootstrapService -params stop -out
>%CATALINA_HOME%\logs\stdout.log -err %CATALINA_HOME%\logs\stderr.log
>
>Unfortunately this doesn't seem to do anything, doesn't error just outputs
>the tomcat.exe options. I'm running Windows2000 with jdk1.4.1 and the
>JAVA_HOME variable is set. Could anyone point me to a batch file that will
>actually install tomcat as a service, or point out where i'm going wrong
>with my batch file?
>
>Thanks
>
>Tom
>
> > -----Original Message-----
> > From: news [mailto:news@main.gmane.org]On Behalf Of Bill Barker
> > Sent: 30 April 2003 08:08
> > To: tomcat-user@jakarta.apache.org
> > Subject: Re: Java Logging API and stderr.log
> >
> >
> > Tomcat uses commons-logging
> > http://jakarta.apache.org/commons/logging.html,
> > which falls back to JDK1.4 logging if available.  You can override this by
> > setting CATALINA_OPT like:
> > CATALINA_OPTS="-Dorg.apache.commons.logging.Log=org.apache.commons
> > .logging.i
> > mplSimpleLog"
> >
> > "Tom Lyle" <toml@limehouse.co.uk> wrote in message
> > news:CDEPKLGHNGJCEPLMHKIBMEDCCBAA.toml@limehouse.co.uk...
> > > Hi All,
> > >
> > > I have a webservices application running as an NT service on Tomcat 4.1,
> > > Windows 2000 server and i've been using the Java Logging API to redirect
> > all
> > > the log messages to my own log files which i've initialised in the
> > following
> > > manner:
> > >
> > > private static void initialiseLogs(){
> > > //initialise dao log
> > > Logger.getLogger(DAO_LOG).addHandler(getHandler(DAO_LOG));
> > > //initailise other logs....
> > > //
> > > //
> > > }
> > >
> > > private static Handler getHandler(String name) throws IOException{
> > > Handler handler = new FileHandler(LOG_FOLDER + File.separator + name
> > > +".log");
> > > handler.setFormatter(new SimpleFormatter());
> > > //set the handlers log level
> > > handler.setLevel(Level.SEVERE);
> > > return handler;
> > > }
> > >
> > > Now this works fine, in that i only get SEVERE messages written
> > to my dao
> > > log file, and if i set the level to INFO i get everything written to the
> > > file. The problem is that no matter what i set the level to ALL my log
> > > messages get written to the Tomcat stderr.log as well(which resides at:
> > > C:\Program Files\Apache Group\Tomcat 4.1\logs\stderr.log)
> > >
> > > Since, like a good little programmer, i had log.info()
> > statements all over
> > > my code during development this means that the stderr.log gets very big
> > very
> > > quickly. How do i stop tomcat writing everything to stderr? And
> > why is it
> > > doing it in the first place? I have no System.err.println() anywhere in
> > the
> > > code(except to catch the log initialisation exception). I'm
> > guessing that
> > > its something to do with the configuration of the Java Logging
> > API but i'm
> > > at a loss as to what as this is the first time i've used it.
> > >
> > > Any help much appreciated
> > >
> > > Tom
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message