RFR (L): 8046148: JEP 158 Unified JVM Logging

Staffan Larsen staffan.larsen at oracle.com
Tue Sep 15 12:27:24 UTC 2015

> On 15 sep 2015, at 14:20, Kirk Pepperdine <kirk at kodewerk.com> wrote:
>> Just for completeness: there can be more than 3 bracket pairs if you configure additional decorations:
>> $ java -Xlog:all::uptime,time,pid,tid,level,tags Hello
>> [2015-09-15T10:08:40.407-0100][0.203s][91539][4867][info   ][logging] Log configuration fully initialized.
> Are there a finite number of decorations? Is the order fixed or how would one tell the diff between pid and tid?

May I refer to the JEP:


Logging messages are decorated with information about the message. Here is a list of the possible decorations:

	• time -- Current time and date in ISO-8601 format
	• uptime -- Time since the start of the JVM in seconds and milliseconds (e.g., 6.567s)
	• timemillis -- The same value as generated by System.currentTimeMillis()
	• uptimemillis -- Milliseconds since the JVM started
	• timenanos -- The same value as generated by System.nanoTime()
	• uptimenanos -- Nanoseconds since the JVM started
	• pid -- The process identifier
	• tid -- The thread identifier
	• level -- The level associated with the log message
	• tags -- The tag-set associated with the log message
Each output can be configured to use a custom set of decorators. The order of them is always the one above though. The decorations to be used can be configured by the user in runtime. Decorations will be prepended to the log message

Example: [6.567s][info][gc,old] Old collection complete


More information about the hotspot-dev mailing list