[ 
https://issues.apache.org/jira/browse/OOZIE-1612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13825906#comment-13825906
 ] 

Robert Kanter commented on OOZIE-1612:
--------------------------------------

{quote}
If we don't set the timezone as part of the XLog format, then the bug would 
come back next time someone adds a log message and doesn't think ahead.
{quote}
That is a good point, and I agree that it would be nice if this was automatic.  
But the concern is that doing a loop and checking {{instanceof}} for every log 
formatting will be "slow".  If a majority of log messages have a {{Date}} 
object in them, then it would definitely make sense to put this in there; 
however, if there's only a small number of log messages that actually do this 
(which is what I'm guessing because I don't recall seeing that many dates), 
then the added overhead isn't worth it.  I guess it would be good to know how 
many times we log a {{Date}}.  

Alternatively, perhaps there's another way of modifying {{XLog#format}} to do 
this that would be more efficient?

> When printing Dates to log messages, we should make sure they are in 
> oozie.processing.timezone
> ----------------------------------------------------------------------------------------------
>
>                 Key: OOZIE-1612
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1612
>             Project: Oozie
>          Issue Type: Improvement
>    Affects Versions: trunk
>            Reporter: Robert Kanter
>            Priority: Minor
>              Labels: newbie
>         Attachments: OOZIE-1612.1.patch, OOZIE-1612.patch
>
>
> We were recently looking into an issue and noticed that the same log message 
> had printed different date objects with different timezones, which makes it 
> hard to compare the two.  Which leads to the bigger picture, which is that we 
> should be printing any Date objects in log messages with the 
> {{oozie.processing.timezone}} timezone (there's a method for that in 
> {{DateUtils}}).  



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to