< prev index next >

src/share/vm/classfile/sharedPathsMiscInfo.cpp

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

@@ -25,10 +25,11 @@
 #include "precompiled.hpp"
 #include "classfile/classLoader.hpp"
 #include "classfile/classLoaderData.inline.hpp"
 #include "classfile/sharedPathsMiscInfo.hpp"
 #include "logging/log.hpp"
+#include "logging/logStream.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/metaspaceShared.hpp"
 #include "memory/resourceArea.hpp"
 #include "runtime/arguments.hpp"
 #include "utilities/ostream.hpp"

@@ -71,13 +72,11 @@
   ClassLoader::trace_class_path(msg, name);
   MetaspaceShared::set_archive_loading_failed();
   return false;
 }
 
-void SharedPathsMiscInfo::print_path(int type, const char* path) {
-  ResourceMark rm;
-  outputStream* out = Log(class, path)::info_stream();
+void SharedPathsMiscInfo::print_path(outputStream* out, int type, const char* path) {
   switch (type) {
   case BOOT:
     out->print("Expecting BOOT path=%s", path);
     break;
   case NON_EXIST:

@@ -104,12 +103,17 @@
     const char* path = _cur_ptr;
     _cur_ptr += strlen(path) + 1;
     if (!read_jint(&type)) {
       return fail("Corrupted archive file header");
     }
-    log_info(class, path)("type=%s ", type_name(type));
-    print_path(type, path);
+    LogTarget(Info, class, path) lt;
+    if (lt.is_enabled()) {
+      lt.print("type=%s ", type_name(type));
+      LogStream ls(lt);
+      print_path(&ls, type, path);
+      ls.cr();
+    }
     if (!check(type, path)) {
       if (!PrintSharedArchiveAndExit) {
         return false;
       }
     } else {
< prev index next >