You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2008/11/28 15:40:25 UTC
DO NOT REPLY [Bug 46296] How to log timestamp in log file
https://issues.apache.org/bugzilla/show_bug.cgi?id=46296
Curt Arnold <ca...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #1 from Curt Arnold <ca...@apache.org> 2008-11-28 06:40:24 PST ---
This is a usage question, not a bug.
There is very limited information given, but assuming that you are using a
PatternLayout, then add a %t or %d format specifier to the pattern to either
output the number of milliseconds since the epoch or a formatted date and time.
You can place a java.text.SimpleDateFormat pattern within a set of braces to
control the format, like:
%d{yyyy-MM-ddTHH:mm:ss}
You can specify a timezone in another pair of braces.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org