logging - Java - Log displaying a wrong timezone -


the log records printed in server.log file has correct time , timezone printed below

####<14-ago-2017 18h03' clst> <info> <jdbc>  

but log records printed in server.out file doesn't reflect clst timezone data, -0300, still reflecting daylight saving time of -0400

**** error      lun ago 14 17:03:35 -04:00 2017 1502744855586 

tried debug following steps:

the deployed web application (atg commerce) prints different levels of log messages debug, info, error, etc., through atg.nucleus.logging.applicationlogging , atg.nucleus.logging.logevent classes.

and timestamp used in above classes follows:

mtimestamp = system.currenttimemillis(); 

a standalone java class test behavior gives below result, right time.

long millis = system.currenttimemillis(); date dat = new date(); dat.settime(millis); system.out.println(dat);  mon aug 14 18:03:40 clst 2017 

also system time of linux box reflects right time:

~]$ date

mon aug 14 18:03:58 clst 2017

need in understanding how , wrong time picked logs in .out file.

additional information: jvm timezone data updated few months reflect updated data, tzdata2017b

the logging.properties found in jre/lib has following properties

handlers= java.util.logging.consolehandler  # add filehandler, use following line instead. #handlers= java.util.logging.filehandler, java.util.logging.consolehandler # setting limit messages printed console. .level= info  # default file output in user's home directory. java.util.logging.filehandler.pattern = %h/java%u.log java.util.logging.filehandler.limit = 50000 java.util.logging.filehandler.count = 1 java.util.logging.filehandler.formatter = java.util.logging.xmlformatter  # limit message printed on console info , above. java.util.logging.consolehandler.level = info java.util.logging.consolehandler.formatter = java.util.logging.simpleformatter 

the oracle weblogic /weblogic/12.1.3.0.0/wlserver/server/lib/consoleapp/consolehelp/web-inf/classes/logging.properties has below properties configured.

#handlers=java.util.logging.consolehandler, java.util.logging.filehandler handlers=com.bea.console.utils.consoleloghandler #java.util.logging.consolehandler.level=finest #java.util.logging.consolehandler.formatter=java.util.logging.simpleformatter com.bea.console.utils.consoleloghandler.level=finest com.bea.console.utils.consoleloghandler.formatter=java.util.logging.simpleformatter java.util.logging.simpleformatter.level=info   org.apache.commons.beanutils.level=warning org.apache.commons.digester.level=warning org.apache.struts.level=info  com.bea.console.utils.mbeanutils.level = debug com.bea.console.utils.mastercontrolprogram.level = debug com.bea.console.utils.consolemessagesbackingfile.level = debug com.bea.console.actions.messages.messagesaction.level = debug com.bea.console.actions.baseconsoleaction.level = debug com.bea.console.utils.mbeanchangemanager.level = debug org.apache.struts.level = warn org.apache.beehive.netui.pageflow.scoping.internal.level = error org.apache.beehive.netui.pageflow.internal.adaptermanager = fatal 

software stack:

  • application server: oracle weblogic v12.1.3.0.0
  • java: jdk1.8
  • atg: 11.2

  1. check if os system reflecting dst correctly
  2. check if have updated java dst using updater tool, ref: http://www.oracle.com/technetwork/java/javase/tzdata-versions-138805.html

Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -