|
View:
New views
8 Messages
—
Rating Filter:
Alert me
|
|
|
Disabling catalina.out logJust curious if anybody knows how to disable tomcat from logging to
catalina.out, possibly by editing the server.xml file? True that we can link catalina.out to /dev/null or truncate the file every now and then, but we prefer to use a more sane approach, than just truncating the file... Thanks |
|
|
Re: Disabling catalina.out logDear Irwan Hadi,
> Just curious if anybody knows how to disable tomcat from logging to > catalina.out, possibly by editing the server.xml file? check out ${tomcat}/conf/logging.conf > True that we can link catalina.out to /dev/null or truncate the file > every > now and then, but we prefer to use a more sane approach, than just > truncating the file... Truncating? It should be a rolling file, rolling over daily. You can just remove the old versions. Is this a stock tomcat, one from the ports, or maybe a particularly old one? The most sane approach would be to work with your developers to have some logging policy that both you and the developers can work with. You'll need at least the exception traces when Tomcat dies, or you're blind. But then, there is nothing like saving a few bucks in disk space at the expense of hours of blind debugging. :-) -- Kees Jan http://java-monitor.com/forum/ kjkoster@... 06-51838192 Human beings make life so interesting. Do you know that in a universe so full of wonders, they have managed to invent boredom. Quite astonishing... -- Terry Partchett --------------------------------------------------------------------- To start a new topic, e-mail: users@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Disabling catalina.out log> Truncating? It should be a rolling file, rolling over daily. You can just
> remove the old versions. Is this a stock tomcat, one from the ports, or > maybe a particularly old one? > catalina.out is set at the catalina.sh: >> "$CATALINA_BASE"/logs/catalina.out 2>&1 & This file is not rateable, as it is jsut a redirection. We are thinking in moving this redirection to /dev/null or just remove the redirection. Is it a sense thing to do? Emerson > The most sane approach would be to work with your developers to have some > logging policy that both you and the developers can work with. You'll need > at least the exception traces when Tomcat dies, or you're blind. > > But then, there is nothing like saving a few bucks in disk space at the > expense of hours of blind debugging. :-) > -- > Kees Jan > > http://java-monitor.com/forum/ > kjkoster@... > 06-51838192 > > Human beings make life so interesting. Do you know that in a universe so > full of wonders, > they have managed to invent boredom. Quite astonishing... -- Terry Partchett > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@... > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > --------------------------------------------------------------------- To start a new topic, e-mail: users@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Disabling catalina.out logDear Emerson,
>> Truncating? It should be a rolling file, rolling over daily. You >> can just >> remove the old versions. Is this a stock tomcat, one from the >> ports, or >> maybe a particularly old one? >> > > catalina.out is set at the catalina.sh: > >>> "$CATALINA_BASE"/logs/catalina.out 2>&1 & > > This file is not rateable, as it is jsut a redirection. You are right. Woops, I thought it was a rotatable file. Maybe I restart my Tomcats too often. :) > We are thinking in moving this redirection to /dev/null or just > remove the redirection. > Is it a sense thing to do? To get rid of an ever-growing file, yes. However, you have to make really sure that you still get all the stack traces and whatnot that is in that file, only get them into a rolling file. Ahhhh. Wait. Now I know why I never run into this. I run my Tomcats in screen using "catalina.sh run", so catalina.out is written to the console instead of a file. I do get a nice daily log e.g. catalina. 2008-08-20.log. That would mean it is safe to redirect catalina.out to /dev/null, as long as you have the daily logs. -- Kees Jan http://java-monitor.com/forum/ kjkoster@... 06-51838192 Human beings make life so interesting. Do you know that in a universe so full of wonders, they have managed to invent boredom. Quite astonishing... -- Terry Partchett --------------------------------------------------------------------- To start a new topic, e-mail: users@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Disabling catalina.out logKees
That one is another log file, configured at logging.properties: 1catalina.org.apache.juli.FileHandler.level = INFO 1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 1catalina.org.apache.juli.FileHandler.prefix = catalina. On 20/08/2008, Kees Jan Koster <kjkoster@...> wrote: > Dear Emerson, > > > > > > Truncating? It should be a rolling file, rolling over daily. You can > just > > > remove the old versions. Is this a stock tomcat, one from the ports, or > > > maybe a particularly old one? > > > > > > > > > > catalina.out is set at the catalina.sh: > > > > > > > > > > > "$CATALINA_BASE"/logs/catalina.out 2>&1 & > > > > > > > > > > > This file is not rateable, as it is jsut a redirection. > > > > You are right. Woops, I thought it was a rotatable file. Maybe I restart my > Tomcats too often. :) > > > We are thinking in moving this redirection to /dev/null or just > > remove the redirection. > > Is it a sense thing to do? > > > > To get rid of an ever-growing file, yes. However, you have to make really > sure that you still get all the stack traces and whatnot that is in that > file, only get them into a rolling file. > > Ahhhh. Wait. Now I know why I never run into this. I run my Tomcats in > screen using "catalina.sh run", so catalina.out is written to the console > instead of a file. I do get a nice daily log e.g. catalina.2008-08-20.log. > > That would mean it is safe to redirect catalina.out to /dev/null, as long as > you have the daily logs. > > > -- > Kees Jan > > http://java-monitor.com/forum/ > kjkoster@... > 06-51838192 > > Human beings make life so interesting. Do you know that in a universe so > full of wonders, > they have managed to invent boredom. Quite astonishing... -- Terry Partchett > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@... > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > --------------------------------------------------------------------- To start a new topic, e-mail: users@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Disabling catalina.out logWhich are the views of other people in the list?
On 21/08/2008, emerson cargnin <echofloripa.yell@...> wrote: > Kees > > That one is another log file, configured at logging.properties: > 1catalina.org.apache.juli.FileHandler.level = INFO > 1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs > 1catalina.org.apache.juli.FileHandler.prefix = catalina. > > On 20/08/2008, Kees Jan Koster <kjkoster@...> wrote: > > Dear Emerson, > > > > > > > > > Truncating? It should be a rolling file, rolling over daily. You can > > just > > > > remove the old versions. Is this a stock tomcat, one from the ports, or > > > > maybe a particularly old one? > > > > > > > > > > > > > > catalina.out is set at the catalina.sh: > > > > > > > > > > > > > > > "$CATALINA_BASE"/logs/catalina.out 2>&1 & > > > > > > > > > > > > > > > This file is not rateable, as it is jsut a redirection. > > > > > > > You are right. Woops, I thought it was a rotatable file. Maybe I restart my > > Tomcats too often. :) > > > > > We are thinking in moving this redirection to /dev/null or just > > > remove the redirection. > > > Is it a sense thing to do? > > > > > > > To get rid of an ever-growing file, yes. However, you have to make really > > sure that you still get all the stack traces and whatnot that is in that > > file, only get them into a rolling file. > > > > Ahhhh. Wait. Now I know why I never run into this. I run my Tomcats in > > screen using "catalina.sh run", so catalina.out is written to the console > > instead of a file. I do get a nice daily log e.g. catalina.2008-08-20.log. > > > > That would mean it is safe to redirect catalina.out to /dev/null, as long as > > you have the daily logs. > > > > > > -- > > Kees Jan > > > > http://java-monitor.com/forum/ > > kjkoster@... > > 06-51838192 > > > > Human beings make life so interesting. Do you know that in a universe so > > full of wonders, > > they have managed to invent boredom. Quite astonishing... -- Terry Partchett > > > > > > --------------------------------------------------------------------- > > To start a new topic, e-mail: users@... > > To unsubscribe, e-mail: users-unsubscribe@... > > For additional commands, e-mail: users-help@... > > > > > --------------------------------------------------------------------- To start a new topic, e-mail: users@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Disabling catalina.out logAgain the issue of the logs.
According to: http://tomcat.apache.org/tomcat-5.5-doc/logging.html 1) I add log4j-1.2.15.jar and commons-logging-1.1.1.jar inside my common/lib 2) I create a log4j.properties inside common/classes with the following content: log4j.rootLogger=ERROR, R log4j.appender.R=org.apache.log4j.DailyRollingFileAppender log4j.appender.R.DatePattern='.'yyyy-MM-dd log4j.appender.R.File=/dev/servers/apache-tomcat-5.5.26_fe/tomcat.log log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%d [%t] %-5p %c - %m%n Result: 1) a rotateable tomcat.log should be created, containing only error logs 2) catalina.out would have all log4j messages, which would be redirected to tomcat.log Well, it doesn't actually happen. - The tomcat.log is actually created, but it still contains all of debug/info messages. - catalina.out still has all log4j messages. Could someone confirm what is the right behaviour? regards Emerson 2008/8/21 emerson cargnin <echofloripa.yell@...>: > Which are the views of other people in the list? > > > On 21/08/2008, emerson cargnin <echofloripa.yell@...> wrote: >> Kees >> >> That one is another log file, configured at logging.properties: >> 1catalina.org.apache.juli.FileHandler.level = INFO >> 1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs >> 1catalina.org.apache.juli.FileHandler.prefix = catalina. >> >> On 20/08/2008, Kees Jan Koster <kjkoster@...> wrote: >> > Dear Emerson, >> > >> > > >> > > > Truncating? It should be a rolling file, rolling over daily. You can >> > just >> > > > remove the old versions. Is this a stock tomcat, one from the ports, or >> > > > maybe a particularly old one? >> > > > >> > > > >> > > >> > > catalina.out is set at the catalina.sh: >> > > >> > > >> > > > >> > > > > "$CATALINA_BASE"/logs/catalina.out 2>&1 & >> > > > > >> > > > >> > > >> > > This file is not rateable, as it is jsut a redirection. >> > > >> > >> > You are right. Woops, I thought it was a rotatable file. Maybe I restart my >> > Tomcats too often. :) >> > >> > > We are thinking in moving this redirection to /dev/null or just >> > > remove the redirection. >> > > Is it a sense thing to do? >> > > >> > >> > To get rid of an ever-growing file, yes. However, you have to make really >> > sure that you still get all the stack traces and whatnot that is in that >> > file, only get them into a rolling file. >> > >> > Ahhhh. Wait. Now I know why I never run into this. I run my Tomcats in >> > screen using "catalina.sh run", so catalina.out is written to the console >> > instead of a file. I do get a nice daily log e.g. catalina.2008-08-20.log. >> > >> > That would mean it is safe to redirect catalina.out to /dev/null, as long as >> > you have the daily logs. >> > >> > >> > -- >> > Kees Jan >> > >> > http://java-monitor.com/forum/ >> > kjkoster@... >> > 06-51838192 >> > >> > Human beings make life so interesting. Do you know that in a universe so >> > full of wonders, >> > they have managed to invent boredom. Quite astonishing... -- Terry Partchett >> > >> > >> > --------------------------------------------------------------------- >> > To start a new topic, e-mail: users@... >> > To unsubscribe, e-mail: users-unsubscribe@... >> > For additional commands, e-mail: users-help@... >> > >> > >> > --------------------------------------------------------------------- To start a new topic, e-mail: users@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Disabling catalina.out logI just did some more tests.
What happens is: - Whatever you put in your app log4j property files is what will go to the catalina.out. There is no such thing as getting a catalina.out clean. - You can have a rotateable tomcat.log. But that will be deplicated from what is already in catalina.out Please correct me if I'm wrong. 2008/10/20 emerson cargnin <echofloripa.yell@...>: > Again the issue of the logs. > > According to: > http://tomcat.apache.org/tomcat-5.5-doc/logging.html > > 1) I add log4j-1.2.15.jar and commons-logging-1.1.1.jar inside my common/lib > 2) I create a log4j.properties inside common/classes with the following content: > > log4j.rootLogger=ERROR, R > log4j.appender.R=org.apache.log4j.DailyRollingFileAppender > log4j.appender.R.DatePattern='.'yyyy-MM-dd > log4j.appender.R.File=/dev/servers/apache-tomcat-5.5.26_fe/tomcat.log > log4j.appender.R.layout=org.apache.log4j.PatternLayout > log4j.appender.R.layout.ConversionPattern=%d [%t] %-5p %c - %m%n > > > Result: > > 1) a rotateable tomcat.log should be created, containing only error logs > 2) catalina.out would have all log4j messages, which would be > redirected to tomcat.log > > Well, it doesn't actually happen. > > - The tomcat.log is actually created, but it still contains all of > debug/info messages. > - catalina.out still has all log4j messages. > > > Could someone confirm what is the right behaviour? > > regards > Emerson > > 2008/8/21 emerson cargnin <echofloripa.yell@...>: >> Which are the views of other people in the list? >> >> >> On 21/08/2008, emerson cargnin <echofloripa.yell@...> wrote: >>> Kees >>> >>> That one is another log file, configured at logging.properties: >>> 1catalina.org.apache.juli.FileHandler.level = INFO >>> 1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs >>> 1catalina.org.apache.juli.FileHandler.prefix = catalina. >>> >>> On 20/08/2008, Kees Jan Koster <kjkoster@...> wrote: >>> > Dear Emerson, >>> > >>> > > >>> > > > Truncating? It should be a rolling file, rolling over daily. You can >>> > just >>> > > > remove the old versions. Is this a stock tomcat, one from the ports, or >>> > > > maybe a particularly old one? >>> > > > >>> > > > >>> > > >>> > > catalina.out is set at the catalina.sh: >>> > > >>> > > >>> > > > >>> > > > > "$CATALINA_BASE"/logs/catalina.out 2>&1 & >>> > > > > >>> > > > >>> > > >>> > > This file is not rateable, as it is jsut a redirection. >>> > > >>> > >>> > You are right. Woops, I thought it was a rotatable file. Maybe I restart my >>> > Tomcats too often. :) >>> > >>> > > We are thinking in moving this redirection to /dev/null or just >>> > > remove the redirection. >>> > > Is it a sense thing to do? >>> > > >>> > >>> > To get rid of an ever-growing file, yes. However, you have to make really >>> > sure that you still get all the stack traces and whatnot that is in that >>> > file, only get them into a rolling file. >>> > >>> > Ahhhh. Wait. Now I know why I never run into this. I run my Tomcats in >>> > screen using "catalina.sh run", so catalina.out is written to the console >>> > instead of a file. I do get a nice daily log e.g. catalina.2008-08-20.log. >>> > >>> > That would mean it is safe to redirect catalina.out to /dev/null, as long as >>> > you have the daily logs. >>> > >>> > >>> > -- >>> > Kees Jan >>> > >>> > http://java-monitor.com/forum/ >>> > kjkoster@... >>> > 06-51838192 >>> > >>> > Human beings make life so interesting. Do you know that in a universe so >>> > full of wonders, >>> > they have managed to invent boredom. Quite astonishing... -- Terry Partchett >>> > >>> > >>> > --------------------------------------------------------------------- >>> > To start a new topic, e-mail: users@... >>> > To unsubscribe, e-mail: users-unsubscribe@... >>> > For additional commands, e-mail: users-help@... >>> > >>> > >>> >> > --------------------------------------------------------------------- To start a new topic, e-mail: users@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
| Free embeddable forum powered by Nabble | Forum Help |