You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "Visvanathan, Meenakshi" <me...@hp.com> on 2007/03/21 05:40:05 UTC

Log4j Date logging issue

Hi,
 We use log4j.jar to log our application's debug statements.
 Debug() and error() methods of Category class is used for logging.

 In the recent past, the System time was upgraded for US 2007 DST
changes.
 After this change, Log4j %d shows the date like, 2007-03-18
23:01:14,909, when the actual systemtime is 03/19/2007 00:01:14.

 We are not sure where log4j gets the previous day timestamp from.

 Pls help us on this.

 Log extract :
INFO  2007-03-18 23:01:14,909  [main]
autorenew.controllers.AutoRenewManager renewPolicy
(AutoRenewManager.java:1560) - Starting process. This process is running
on 03/19/2007 at  00:01:14 INFO  2007-03-18 23:01:16,324  [main]
autorenew.controllers.AutoRenewManager renewPolicy
(AutoRenewManager.java:1833) - Successfully updated record with Member
Number :XXXXXXXXXXX and Offer Number :XX

Config details:
log4j.rootCategory=debug, stdout, R

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%5p [%t]

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=./logs/RenewPolicy.log

log4j.appender.R.MaxFileSize=100KB
# Keep one backup file
log4j.appender.R.MaxBackupIndex=100

log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%-5p %d  [%t] %c{3} %M (%F:%L)
- %m%n

Thanks
Meenakshi

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Log4j Date logging issue

Posted by Scott Heaberlin <he...@gmail.com>.
Be advised - java date and time calculations will still be inaccurate
even if the host OS has been updated with DST 2007 updates on older VM
builds.  Per the Sun documentation regarding DST updates you still
must either patch your affected JRE with the free tz_update program or
upgrade to a newer JRE altogether.

Regards,

scott heaberlin

On 3/21/07, James Stauffer <st...@gmail.com> wrote:
> I would attemp to make a small program that prints the current data
> and time in the same format to confirm that it is the JRE or OS.  You
> may need JRE patch that supports the changed DST dates.
>
> On 3/20/07, Visvanathan, Meenakshi <me...@hp.com> wrote:
> > Hi,
> >  We use log4j.jar to log our application's debug statements.
> >  Debug() and error() methods of Category class is used for logging.
> >
> >  In the recent past, the System time was upgraded for US 2007 DST
> > changes.
> >  After this change, Log4j %d shows the date like, 2007-03-18
> > 23:01:14,909, when the actual systemtime is 03/19/2007 00:01:14.
> >
> >  We are not sure where log4j gets the previous day timestamp from.
> >
> >  Pls help us on this.
> >
> >  Log extract :
> > INFO  2007-03-18 23:01:14,909  [main]
> > autorenew.controllers.AutoRenewManager renewPolicy
> > (AutoRenewManager.java:1560) - Starting process. This process is running
> > on 03/19/2007 at  00:01:14 INFO  2007-03-18 23:01:16,324  [main]
> > autorenew.controllers.AutoRenewManager renewPolicy
> > (AutoRenewManager.java:1833) - Successfully updated record with Member
> > Number :XXXXXXXXXXX and Offer Number :XX
> >
> > Config details:
> > log4j.rootCategory=debug, stdout, R
> >
> > log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> > log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> >
> > # Pattern to output the caller's file name and line number.
> > log4j.appender.stdout.layout.ConversionPattern=%5p [%t]
> >
> > log4j.appender.R=org.apache.log4j.RollingFileAppender
> > log4j.appender.R.File=./logs/RenewPolicy.log
> >
> > log4j.appender.R.MaxFileSize=100KB
> > # Keep one backup file
> > log4j.appender.R.MaxBackupIndex=100
> >
> > log4j.appender.R.layout=org.apache.log4j.PatternLayout
> > log4j.appender.R.layout.ConversionPattern=%-5p %d  [%t] %c{3} %M (%F:%L)
> > - %m%n
> >
> > Thanks
> > Meenakshi
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
>
> --
> James Stauffer        http://www.geocities.com/stauffer_james/
> Are you good? Take the test at http://www.livingwaters.com/good/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


-- 

-Scott


Scott Heaberlin

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Log4j Date logging issue

Posted by James Stauffer <st...@gmail.com>.
I would attemp to make a small program that prints the current data
and time in the same format to confirm that it is the JRE or OS.  You
may need JRE patch that supports the changed DST dates.

On 3/20/07, Visvanathan, Meenakshi <me...@hp.com> wrote:
> Hi,
>  We use log4j.jar to log our application's debug statements.
>  Debug() and error() methods of Category class is used for logging.
>
>  In the recent past, the System time was upgraded for US 2007 DST
> changes.
>  After this change, Log4j %d shows the date like, 2007-03-18
> 23:01:14,909, when the actual systemtime is 03/19/2007 00:01:14.
>
>  We are not sure where log4j gets the previous day timestamp from.
>
>  Pls help us on this.
>
>  Log extract :
> INFO  2007-03-18 23:01:14,909  [main]
> autorenew.controllers.AutoRenewManager renewPolicy
> (AutoRenewManager.java:1560) - Starting process. This process is running
> on 03/19/2007 at  00:01:14 INFO  2007-03-18 23:01:16,324  [main]
> autorenew.controllers.AutoRenewManager renewPolicy
> (AutoRenewManager.java:1833) - Successfully updated record with Member
> Number :XXXXXXXXXXX and Offer Number :XX
>
> Config details:
> log4j.rootCategory=debug, stdout, R
>
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
>
> # Pattern to output the caller's file name and line number.
> log4j.appender.stdout.layout.ConversionPattern=%5p [%t]
>
> log4j.appender.R=org.apache.log4j.RollingFileAppender
> log4j.appender.R.File=./logs/RenewPolicy.log
>
> log4j.appender.R.MaxFileSize=100KB
> # Keep one backup file
> log4j.appender.R.MaxBackupIndex=100
>
> log4j.appender.R.layout=org.apache.log4j.PatternLayout
> log4j.appender.R.layout.ConversionPattern=%-5p %d  [%t] %c{3} %M (%F:%L)
> - %m%n
>
> Thanks
> Meenakshi
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


-- 
James Stauffer        http://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org