Gary,

Thanks for this - it will be very, very useful for our project.

Ed

On Wed, Oct 2, 2013 at 7:53 AM, Gary Gregory <[email protected]> wrote:
> On Tue, Oct 1, 2013 at 1:08 PM, Gary Gregory <[email protected]> wrote:
>
>> I create a JIRA to track possible solutions:
>> https://issues.apache.org/jira/browse/LOG4J2-415
>>
>> I have attached two different solutions in a patch file.
>>
>
> I reworked the code in the date converter solution to be more OO. This is
> now in SVN. Use %d{UNIX} and %d{UNIX_MILLIS}. I updated the manual in SVN
> as well.
>
> Gary
>
>
>>
>> Gary
>>
>>
>> On Mon, Sep 30, 2013 at 11:33 PM, Gary Gregory <[email protected]>wrote:
>>
>>> Hello Ed,
>>>
>>> This is what Log4j 2 can do now WRT to time stamp formatting:
>>> https://logging.apache.org/log4j/2.x/manual/layouts.html#PatternLayout
>>>
>>> When you say epoch time, do you mean simply that you would like to use
>>> the result of java.lang.System.currentTimeMillis() ?
>>>
>>> Gary
>>>
>>>
>>> On Mon, Sep 30, 2013 at 8:30 PM, Edward Peschko <[email protected]>wrote:
>>>
>>>> All,
>>>>
>>>> For reasons of simplicity && consistency, I would like to have my logs
>>>> have epoch time (plus milliseconds) as their format. I figure:
>>>>
>>>> 1. this should be the most efficient way to get a timestamp
>>>> 2. it is completely clear - unlike local time, or partial times (eg.
>>>> HH:MM:SS) there is no question of exactly when the event occurred.
>>>> 3. it is concise - only taking 10 (or 14 with ms timestamp) characters.
>>>> 4. it is exceedingly easy to do date arithmetic with it
>>>> 5. it can searched as a number hence finding ranges in which events
>>>> occured in very large files is a simple, binary search.
>>>>
>>>> Anyways, looking through the docs for log4j, I didn't see any docs on
>>>> how to do this. Is it possible, and if not currently possible, how
>>>> easy would it be to add it?
>>>>
>>>> Again, I'd like to standardize all my logs on this, so any info on how
>>>> to do it is appreciated..
>>>>
>>>> Thanks much,
>>>>
>>>> Ed
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [email protected]
>>>> For additional commands, e-mail: [email protected]
>>>>
>>>>
>>>
>>>
>>> --
>>> E-Mail: [email protected] | [email protected]
>>> Java Persistence with Hibernate, Second 
>>> Edition<http://www.manning.com/bauer3/>
>>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>>> Spring Batch in Action <http://www.manning.com/templier/>
>>> Blog: http://garygregory.wordpress.com
>>> Home: http://garygregory.com/
>>> Tweet! http://twitter.com/GaryGregory
>>>
>>
>>
>>
>> --
>> E-Mail: [email protected] | [email protected]
>> Java Persistence with Hibernate, Second 
>> Edition<http://www.manning.com/bauer3/>
>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>> Spring Batch in Action <http://www.manning.com/templier/>
>> Blog: http://garygregory.wordpress.com
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
>>
>
>
>
> --
> E-Mail: [email protected] | [email protected]
> Java Persistence with Hibernate, Second 
> Edition<http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to