You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Satya <sa...@capricornsys-global.com> on 2002/06/17 17:32:08 UTC

redirecting the output to a log file

Hi All,

  I am using catalina. When my servlets are sending some stack trace / debug
output, all such output is dumped in the catalina window. I tried changing
the logger class in server.xml, used startup 2>output.txt etc but no
technique is working,

 I am using standalone catalina on windows NT


Please suggest

Satya



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: redirecting the output to a log file

Posted by Richard Plukker <ri...@bowtie.nl>.
Satya wrote:

>Hi Richards,
>
>I am already using file stream to write a log of my application specific
>info (and will move the application in next iteration to
>log4j).
>
>However i am having problem with capturing the error messages which catalina
>dumps if there is any error. They are appearing in the window in which
>catalina
>is running - since the scroll up immediatly, i could not read them, and they
>are not
>appearing in any of the log files under CATALINA_HOME\logs\
>
> When i issued the bin\startup.bat >a.out   or   bin\startup.bat  2>a.err
>it only prints that "tomcat started" etc but not
>the error dump.
>
>Regards
>Satya
>
>
>
>----- Original Message -----
>From: Richard Plukker <ri...@bowtie.nl>
>To: Tomcat Users List <to...@jakarta.apache.org>
>Sent: Monday, June 17, 2002 9:20 PM
>Subject: Re: redirecting the output to a log file
>
>
>  
>
>>Hello Satya,
>>
>>I suggest Log4j.
>>You can log to different out streams. You can configure the way you log
>>outside you program code, using a log4j.properties file.
>>@see http://jakarta.apache.org/log4j
>>
>>Also you can use the catalina way of logging.
>>
>>And you can make your own logging mechanism by appending to a
>>java.io.RandomAccess file. But keep in mind that you have to programm a
>>    
>>
>lot
>  
>
>>to make it thread safe etc.
>>
>>Good luck.
>>
>>
>>Richard
>>
>>
>>On Monday 17 June 2002 17:32, you wrote:
>>    
>>
>>>Hi All,
>>>
>>>  I am using catalina. When my servlets are sending some stack trace /
>>>debug output, all such output is dumped in the catalina window. I tried
>>>changing the logger class in server.xml, used startup 2>output.txt etc
>>>      
>>>
>but
>  
>
>>>no technique is working,
>>>
>>> I am using standalone catalina on windows NT
>>>
>>>
>>>Please suggest
>>>
>>>Satya
>>>      
>>>
>>--
>>To unsubscribe, e-mail:
>>    
>>
><ma...@jakarta.apache.org>
>  
>
>>For additional commands, e-mail:
>>    
>>
><ma...@jakarta.apache.org>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>  
>
Hello Satya,

These messages are in catalina.out
You can use tail -f catalina.out to see what is happening.
Or if you work on windows, you should go to the properties of the dosbox 
and put the buffer size to 1000 lines than you can scroll up.

good luck,

Richard



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: redirecting the output to a log file

Posted by Satya <sa...@capricornsys-global.com>.
Hi Richards,

I am already using file stream to write a log of my application specific
info (and will move the application in next iteration to
log4j).

However i am having problem with capturing the error messages which catalina
dumps if there is any error. They are appearing in the window in which
catalina
is running - since the scroll up immediatly, i could not read them, and they
are not
appearing in any of the log files under CATALINA_HOME\logs\

 When i issued the bin\startup.bat >a.out   or   bin\startup.bat  2>a.err
it only prints that "tomcat started" etc but not
the error dump.

Regards
Satya



----- Original Message -----
From: Richard Plukker <ri...@bowtie.nl>
To: Tomcat Users List <to...@jakarta.apache.org>
Sent: Monday, June 17, 2002 9:20 PM
Subject: Re: redirecting the output to a log file


> Hello Satya,
>
> I suggest Log4j.
> You can log to different out streams. You can configure the way you log
> outside you program code, using a log4j.properties file.
> @see http://jakarta.apache.org/log4j
>
> Also you can use the catalina way of logging.
>
> And you can make your own logging mechanism by appending to a
> java.io.RandomAccess file. But keep in mind that you have to programm a
lot
> to make it thread safe etc.
>
> Good luck.
>
>
> Richard
>
>
> On Monday 17 June 2002 17:32, you wrote:
> > Hi All,
> >
> >   I am using catalina. When my servlets are sending some stack trace /
> > debug output, all such output is dumped in the catalina window. I tried
> > changing the logger class in server.xml, used startup 2>output.txt etc
but
> > no technique is working,
> >
> >  I am using standalone catalina on windows NT
> >
> >
> > Please suggest
> >
> > Satya
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: redirecting the output to a log file

Posted by Richard Plukker <ri...@bowtie.nl>.
Hello Satya,

I suggest Log4j.
You can log to different out streams. You can configure the way you log 
outside you program code, using a log4j.properties file.
@see http://jakarta.apache.org/log4j

Also you can use the catalina way of logging.

And you can make your own logging mechanism by appending to a 
java.io.RandomAccess file. But keep in mind that you have to programm a lot 
to make it thread safe etc.

Good luck.


Richard


On Monday 17 June 2002 17:32, you wrote:
> Hi All,
>
>   I am using catalina. When my servlets are sending some stack trace /
> debug output, all such output is dumped in the catalina window. I tried
> changing the logger class in server.xml, used startup 2>output.txt etc but
> no technique is working,
>
>  I am using standalone catalina on windows NT
>
>
> Please suggest
>
> Satya

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>