< prev index next >

src/share/vm/logging/logTagSet.cpp

Print this page
rev 10178 : imported patch 8145934

@@ -22,10 +22,11 @@
  *
  */
 #include "precompiled.hpp"
 #include "logging/logDecorations.hpp"
 #include "logging/logLevel.hpp"
+#include "logging/logMessage.hpp"
 #include "logging/logOutput.hpp"
 #include "logging/logTag.hpp"
 #include "logging/logTagSet.hpp"
 
 LogTagSet*  LogTagSet::_list      = NULL;

@@ -75,10 +76,17 @@
   for (LogOutputList::Iterator it = _output_list.iterator(level); it != _output_list.end(); it++) {
     (*it)->write(decorations, msg);
   }
 }
 
+void LogTagSet::log(const LogMessage& msg) {
+  LogDecorations decorations(LogLevel::Invalid, *this, _decorators);
+  for (LogOutputList::Iterator it = _output_list.iterator(msg.least_detailed_level()); it != _output_list.end(); it++) {
+    (*it)->write(msg.iterator(it.level(), decorations));
+  }
+}
+
 int LogTagSet::label(char* buf, size_t len, const char* separator) const {
   int tot_written = 0;
   for (size_t i = 0; i < _ntags; i++) {
     int written = jio_snprintf(buf + tot_written, len - tot_written, "%s%s",
                                (i == 0 ? "" : separator),
< prev index next >