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 Joan ventusproxy <jo...@ventusproxy.com> on 2020/06/26 17:01:58 UTC
Get timestamp from logged line
Hello,
�
I’m using the following pattern to log lines:
<Pattern>%m%d{yyyy-MM-dd HH:mm:ss.SSS}%n</Pattern>
�
And writing the line with: this.accessLog.info(variable)
�
I was wondering if there is any chance to get the timestamp printed in the line (%d{yyyy-MM-dd HH:mm:ss.SSS}) after writing it to the file with the ‘info’ method.
�
Thanks,
�
Joan.
Re: Get timestamp from logged line
Posted by Ralph Goers <ra...@dslextreme.com>.
> On Jun 26, 2020, at 10:01 AM, Joan ventusproxy <jo...@ventusproxy.com> wrote:
>
> Hello,
>
> �
>
> I’m using the following pattern to log lines:
>
> <Pattern>%m%d{yyyy-MM-dd HH:mm:ss.SSS}%n</Pattern>
>
> �
>
> And writing the line with: this.accessLog.info(variable)
>
> �
>
> I was wondering if there is any chance to get the timestamp printed in the line (%d{yyyy-MM-dd HH:mm:ss.SSS}) after writing it to the file with the ‘info’ method.
I don’t think I understand what you want.
Ralph
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org