< prev index next >

src/share/vm/classfile/classLoader.cpp

Print this page
rev 13288 : imported patch 8181917-refactor-ul-logstream

@@ -38,10 +38,12 @@
 #include "compiler/compileBroker.hpp"
 #include "gc/shared/collectedHeap.inline.hpp"
 #include "gc/shared/generation.hpp"
 #include "interpreter/bytecodeStream.hpp"
 #include "interpreter/oopMapCache.hpp"
+#include "logging/log.hpp"
+#include "logging/logStream.hpp"
 #include "logging/logTag.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/filemap.hpp"
 #include "memory/oopFactory.hpp"
 #include "memory/resourceArea.hpp"

@@ -607,29 +609,29 @@
     }
   }
 }
 
 void ClassLoader::trace_class_path(const char* msg, const char* name) {
-  if (log_is_enabled(Info, class, path)) {
-    ResourceMark rm;
-    outputStream* out = Log(class, path)::info_stream();
+  LogTarget(Info, class, path) lt;
+  if (lt.is_enabled()) {
+    LogStream ls(lt);
     if (msg) {
-      out->print("%s", msg);
+      ls.print("%s", msg);
     }
     if (name) {
       if (strlen(name) < 256) {
-        out->print("%s", name);
+        ls.print("%s", name);
       } else {
         // For very long paths, we need to print each character separately,
         // as print_cr() has a length limit
         while (name[0] != '\0') {
-          out->print("%c", name[0]);
+          ls.print("%c", name[0]);
           name++;
         }
       }
     }
-    out->cr();
+    ls.cr();
   }
 }
 
 #if INCLUDE_CDS
 void ClassLoader::check_shared_classpath(const char *path) {
< prev index next >