You should be able to use include the following in your pattern: %d{UNIX_MILLIS}
>From the docs:
>https://logging.apache.org/log4j/2.x/manual/layouts.html#PatternLayout
Best,
-ck
On Thu, Sep 30, 2021, at 17:55, Niranjan Rao wrote:
> Greetings,
>
> On log4j2.
>
> I have tried obvious searches and it was immediately clear to me. I'm
> looking for a way to get the time stamp similar to value returned by
> System.currentTimeMillis().
>
> Also want to ensure I can log both human readable and (more) machine
> readable formats based on format string. We have some other log files
> which can't use log4j and just log Sytem.currentTimeMilis as the time
> stamp and it gets very interesting to match timestamps.
>
> Regards,
>
> Niranjan
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]