-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Niranjan,

On 11/26/14 1:40 PM, Niranjan Babu Bommu wrote:
> Can you please help me out catalina.out rotation, I have only thing
> pending in my migration project.
> 
> I want to rotate catalina.out everyday midnight.

It sounds like you are saying that rotation isn't working properly:
the rotation occurs but not at midnight.

I think it's unlikely that catalina.out is being rotated properly
because, really, it can't be unless you have modified catalina.sh (or
catalina.bat) and piped the output through a rotatable logging
utility. Since you didn't mention having done that, I assume that you
have done something incorrectly to get your catalina.out file to rotate.

As for rotating at some other time than midnight, I suspect that you
and the JVM disagree over the time zone you are operating in.

If you fix the time zone issue, you'll get rotation occurring at the
right time.

- -chris

> On Fri, Nov 21, 2014 at 2:00 PM, Niranjan Babu Bommu < 
> niranjan.bo...@gmail.com> wrote:
> 
>> Hi Chris,
>> 
>> Thanks for your reply.
>> 
>> Actually I'm running multiple instances in tomcat, log-rotation
>> works fine for all the instances but they are not rotation
>> midnight everyday,
>> 
>> '.'yyyy-MM-ddRollover at midnight each day. Thanks Niranjan
>> 
>> On Fri, Nov 21, 2014 at 12:18 PM, Christopher Schultz < 
>> ch...@christopherschultz.net> wrote:
>> 
> Niranjan,
> 
> On 11/21/14 10:38 AM, Niranjan Babu Bommu wrote:
>>>>> I’m working on a project migrating apps from jboss to
>>>>> tomcat, I’m running into an issue that is catalina.out
>>>>> rotation, I’m using log4.properties. Everything works fine,
>>>>> log rotation happening but not everyday midnight. I ‘m
>>>>> having difficult time to figure out. could some one help me
>>>>> out on this
>>>>> 
>>>>> I followed this document to setup.
>>>>> 
>>>>> http://tomcat.apache.org/tomcat-7.0-doc/logging.html#Using_Log4j.
>>>>>
>>>>>
>>>>> 
log4j.properties in CATALINA_BASE/lib
>>>>> 
>>>>> 
>>>>> 
>>>>> log4j.rootLogger=INFO,catalina
>>>>> 
>>>>> log4j.appender.catalina=org.apache.log4j.DailyRollingFileAppender
>>>>>
>>>>> 
log4j.appender.catalina.File=${catalina.base}/logs/catalina.out
>>>>> log4j.appender.catalina.Append=true 
>>>>> log4j.appender.catalina.Encoding=UTF-8
>>>>> 
>>>>> # Roll-over the log once per day 
>>>>> log4j.appender.catalina.DatePattern='.'yyyy-MM-dd'.log' 
>>>>> log4j.appender.catalina.layout=org.apache.log4j.PatternLayout
>>>>>
>>>>> 
log4j.appender.catalina.layout.ConversionPattern=%d [%t] %-5p %c-
>>>>> %m%n
> 
> If you use ${catalina.base}/logs/catalina.out with log4j and you
> are also using Tomcat's standard scripts to launch Tomcat, then you
> will have a conflict because logs/catalina.out is used for
> redirection of the stdout and stderr streams when the JVM
> launches.
> 
> Instead, use a different file with log4j, and minimize the amount
> of stuff going to stdout/stderr so that it does not require any
> rotation at all.
> 
> -chris
>>> 
>>> ---------------------------------------------------------------------
>>>
>>> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>> 
>>> 
>> 
>> 
>> -- *Thanks* *Niranjan* *+1 781.956.6900 <%2B1%20781.956.6900>*
>> 
> 
> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUdkbWAAoJEBzwKT+lPKRYsNMP/ixRTtQ8vvtBX5Qpx/ZVGwKm
fjwIKc9GPtWoTVCdudhPIYzvp2sHE/KY+1t4w8NgQKMbJ06o70FlTLMyYvagyWEK
v0EOjU925mgPPdraoSkgdCYCjOE/AAjAlgUCyhqT/RUF9pBGhVgZVRV6jc+99oB7
2ah0ynu9mZajr3gWulsuXrYlxiA/GK1F261ZPoqBsYAoAwLgX0xtJ1OKUeLo130y
Tyjrw/rKAjy8WDdt0oBwP4voWVEDqGMpyJYxUACe+jLLLYUfG3Xeb94BCzidtfWM
myR7A2YI9/NiqgzYSFmV/6QzxsgIMWqJUjwjkGmaRCnbJ+wcw1JiWMkB8W5cQAkk
m5ZXA+DaKXMUJy8TXJbtG48C7poUmxD+9XWvWcJokp370t0fX9JIM5uQUzSzjzDk
Z+5zzOVW+0Uyz1SO6MBPAG1w/LZZhaJkyU9G+pFLs1VlsiJ4I6tZsmAQlC9kdgYq
vHSEk4+fVmRiUQOIPGx+C1f9PsuZ7SKJi1qbuErsNG4+j8sqO0dY56bzuI1Q7sW5
vjdhrXD2ani8TA8CkzeGZWmfGLkUIb5k3LT8hib3IciL5sLDRA09MsomfyQCR0EP
3b7famnfopHSWY8Bt26isnhSB3crzTOwIXvzHsxXt10eoZF8dyXHdf8NJ1/6t2dX
NHSvurec1nQKbTHyA9Lo
=BuTp
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to