hotspot/src/share/vm/logging/logStream.inline.hpp
changeset 37255 100d4a515df0
parent 37254 8631304f255c
child 37460 bda48699fd11
--- a/hotspot/src/share/vm/logging/logStream.inline.hpp	Tue Apr 05 10:35:39 2016 +0200
+++ b/hotspot/src/share/vm/logging/logStream.inline.hpp	Tue Apr 05 10:41:52 2016 +0200
@@ -25,6 +25,7 @@
 #define SHARE_VM_LOGGING_LOGSTREAM_INLINE_HPP
 
 #include "logging/log.hpp"
+#include "logging/logHandle.hpp"
 #include "logging/logStream.hpp"
 #include "memory/resourceArea.hpp"
 #include "utilities/ostream.hpp"
@@ -68,6 +69,15 @@
       _embedded_resource_mark(),
       _stream(level, &LogTagSetMapping<T0, T1, T2, T3, T4>::tagset()) {}
 
+  // Constructor to support creation from a LogTargetHandle.
+  //
+  // LogTarget(Debug, gc) log;
+  // LogTargetHandle(log) handle;
+  // LogStream stream(handle);
+  LogStream(LogTargetHandle handle) :
+      _embedded_resource_mark(),
+      _stream(handle._level, handle._tagset) {}
+
   // Override of outputStream::write.
   void write(const char* s, size_t len) { _stream.write(s, len); }
 };