< prev index next >
src/share/vm/logging/log.hpp
Print this page
rev 10178 : imported patch 8145934
@@ -32,10 +32,12 @@
#include "memory/allocation.inline.hpp"
#include "runtime/os.hpp"
#include "utilities/debug.hpp"
#include "utilities/ostream.hpp"
+class LogMessage;
+
//
// Logging macros
//
// Usage:
// log_<level>(<comma separated log tags>)(<printf-style log arguments>);
@@ -105,10 +107,14 @@
static bool is_level(LogLevelType level) {
return LogTagSetMapping<T0, T1, T2, T3, T4>::tagset().is_level(level);
}
+ static void write(const LogMessage& msg) {
+ LogTagSetMapping<T0, T1, T2, T3, T4>::tagset().log(msg);
+ };
+
template <LogLevelType Level>
ATTRIBUTE_PRINTF(1, 2)
static void write(const char* fmt, ...) {
va_list args;
va_start(args, fmt);
@@ -135,10 +141,11 @@
puts<Level>(newbuf);
FREE_C_HEAP_ARRAY(char, newbuf);
} else {
puts<Level>(buf);
}
+ va_end(saved_args);
}
template <LogLevelType Level>
static void puts(const char* string) {
LogTagSetMapping<T0, T1, T2, T3, T4>::tagset().log(Level, string);
< prev index next >