RFR: 8142979: Add programmatic enable/disable methods to Unified Logging
Marcus Larsson
marcus.larsson at oracle.com
Tue Dec 1 08:03:15 UTC 2015
On 2015-11-30 19:40, Coleen Phillimore wrote:
>
> I'm confused how this API works.
>
> http://cr.openjdk.java.net/~mockner/classunload/src/share/vm/prims/jvmtiEnv.cpp.sdiff.html
>
>
> I imagine we'd want to do:
>
> if (value != 0) {
> LogConfiguration::configure_stdout(info, true, classunload);
> } else {
> LogConfiguration::configure_stdout(off, true, classunload);
> }
>
> ???
Yes, except you would need to pass the classunload tag with the LOG_TAGS
macro, so it'd be:
if (value != 0) {
LogConfiguration::configure_stdout(LogLevel::Info, true,
LOG_TAGS(classunload));
} else {
LogConfiguration::configure_stdout(LogLevel::Off, true,
LOG_TAGS(classunload));
}
and that would be the same as passing -Xlog:classunload=info and
-Xlog:classunload=off
Regards,
Marcus
> Thanks,
> Coleen
>
>
> On 11/25/15 7:13 AM, Marcus Larsson wrote:
>> Hi,
>>
>> Please review the following patch adding support for configuration of
>> the stdout unified logging output from within the VM itself.
>>
>> The patch adds the configure_stdout() function, allowing a set of
>> tags to be set to the given level on stdout.
>> To disable logging the level is simply specified as LogLevel::Off.
>>
>> The patch depends on the fix for 8142952 [0] that's currently out on
>> review, so the configuration is correctly aggregated rather than reset.
>>
>> Webrev:
>> http://cr.openjdk.java.net/~mlarsson/8142979/webrev.00/
>>
>> Issue:
>> https://bugs.openjdk.java.net/browse/JDK-8142979
>>
>> Thanks,
>> Marcus
>>
>> [0]: https://bugs.openjdk.java.net/browse/JDK-8142952
>
More information about the hotspot-runtime-dev
mailing list