--- old/src/share/vm/classfile/systemDictionary.cpp 2017-06-21 17:37:51.112435000 +0200 +++ new/src/share/vm/classfile/systemDictionary.cpp 2017-06-21 17:37:50.043591100 +0200 @@ -46,6 +46,7 @@ #include "interpreter/bytecodeStream.hpp" #include "interpreter/interpreter.hpp" #include "logging/log.hpp" +#include "logging/logStream.hpp" #include "memory/filemap.hpp" #include "memory/oopFactory.hpp" #include "memory/resourceArea.hpp" @@ -431,15 +432,16 @@ // Now we have to call back to java to check if the initating class has access JavaValue result(T_VOID); - if (log_is_enabled(Debug, protectiondomain)) { + LogTarget(Debug, protectiondomain) lt; + if (lt.is_enabled()) { ResourceMark rm; // Print out trace information - outputStream* log = Log(protectiondomain)::debug_stream(); - log->print_cr("Checking package access"); - log->print("class loader: "); class_loader()->print_value_on(log); - log->print(" protection domain: "); protection_domain()->print_value_on(log); - log->print(" loading: "); klass->print_value_on(log); - log->cr(); + LogStream ls(lt); + ls.print_cr("Checking package access"); + ls.print("class loader: "); class_loader()->print_value_on(&ls); + ls.print(" protection domain: "); protection_domain()->print_value_on(&ls); + ls.print(" loading: "); klass->print_value_on(&ls); + ls.cr(); } InstanceKlass* system_loader = SystemDictionary::ClassLoader_klass();