8153845: UL log write method missing essential assert
Reviewed-by: mlarsson, brutisso
--- a/hotspot/src/share/vm/logging/logTagSet.cpp Fri Apr 08 15:36:34 2016 +0200
+++ b/hotspot/src/share/vm/logging/logTagSet.cpp Mon Apr 11 09:45:03 2016 +0200
@@ -98,6 +98,7 @@
const size_t vwrite_buffer_size = 512;
void LogTagSet::vwrite(LogLevelType level, const char* fmt, va_list args) {
+ assert(level >= LogLevel::First && level <= LogLevel::Last, "Log level:%d is incorrect", level);
char buf[vwrite_buffer_size];
va_list saved_args; // For re-format on buf overflow.
va_copy(saved_args, args);