changeset 10868:dc71732b59d6

8153845: UL log write method missing essential assert Reviewed-by: mlarsson, brutisso
author rehn
date Mon, 11 Apr 2016 09:45:03 +0200
parents 78eaba1e0d24
children 5bc83f454d50
files src/share/vm/logging/logTagSet.cpp
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/logging/logTagSet.cpp	Fri Apr 08 15:36:34 2016 +0200
+++ b/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);