Updates to JEP-158: JVM Unified Logging are coming...
Fredrik Arvidsson
fredrik.arvidsson at oracle.com
Fri Apr 17 08:13:44 UTC 2015
Hi Mattis
The hierarchical structure is gone. Each log line in the code should
contain all tags related to the message logged.
In your example below the line would be printed just like before since
the log call contains the gc tag.
All tags will be defined in a single source file. The available tags
will just like before be enumerable in runtime.
/Fredrik
On 2015-04-17 09:55, Mattis Castegren wrote:
> Hi
>
> Is the hierarchical thought completely gone, or can one tag be a "sub set" of another? Previously, you had the example of a logging module gc_g1_init. If you add some "g1" logging, would that also be printed is someone runs with Xverbose:gc? Or would the log message need to include all tags, like
> log("gc,g1,init", <message>)?
>
> Also, will all tags be defined in one file so that you can see which modules exists?
>
> Kind Regards
> /Mattis
>
> -----Original Message-----
> From: Fredrik Arvidsson
> Sent: den 17 april 2015 09:33
> To: serviceability-dev at openjdk.java.net serviceability-dev at openjdk.java.net; hotspot-dev at openjdk.java.net Source Developers
> Subject: Updates to JEP-158: JVM Unified Logging are coming...
>
> Hi
>
> We are planning to release an updated version of JEP-158 very soon. The
> work to update this JEP has been going on for some time and we now feel
> we are ready to present it to a wider audience.
>
> The JEP for JVM Unified Logging was created back in February 2012. The
> requirements for the API and implementation were heavily influenced by
> the logging functionality in JRockit JVM. The JEP was updated and
> refined in mid 2014 and eventually targeted for JDK 9 in late 2014:
> https://bugs.openjdk.java.net/browse/JDK-8046148
>
> During the review process of the JEP some concerns were voiced about the
> chosen API and functionality but the conclusion was that the proposal
> would work, and the JEP was targeted for JDK 9 and the implementation
> work was started.
>
> Early 2015 during pre-reviews and presentations of the API and
> implementation concerns were again raised about the formulation of the
> JEP, this time with greater force. At this point we decided to take a
> time-out and investigate our options going forward.
>
> The time-out led to a modified proposal that can be found here:
> http://cr.openjdk.java.net/~farvidsson/JEP-158/JEP-158.html
> and with some illustrations here:
> http://cr.openjdk.java.net/~farvidsson/JEP-158/JEP-158_Illustration.png
>
> So what have we changed, and why?
> In short we have switched from using an hierarchical log subject layout
> to something that could be best described as a tag based solution.
>
> The main reason for the change of the logging API is that we have found
> that some logging can't easily be ordered under a single hierarchical
> subject but can belong to multiple subjects/areas. One example of this
> is logging in the 'metaspace' code. The functionality in the 'metaspace
> area' can be called from both GC and Runtime code. Another example is
> class-unloading. There are more examples on this of course, but these
> two we think are very clear and easy to understand.
>
> The core functionality of the logging framework is not changed that much
> from the earlier proposal. We have tried to make it leaner and not as
> verbose (functionality wise) as before. The scope of the implementation
> has been narrowed down some to enable us to deliver good value as soon
> as possible.
>
> Our plan is as follows:
> After getting initial feedback from the community about the new proposal
> we will update the JEP description. We aim to do this early next week.
> We are planning to use the JDK9 sandbox repository during development.
> This enables us who are implementing it to work in an efficient way and
> at the same time it allows any interested party to try out and follow
> the work during the implementation phase.
>
> More information about the sandbox repository name and other
> practicalities will follow shortly.
>
> Cheers
> Fredrik Arvidsson & Marcus Larsson, JVM Serviceability, Stockholm.
More information about the serviceability-dev
mailing list