< prev index next >

src/share/vm/logging/logOutput.cpp

Print this page




  61     if (ret == -1) {
  62       // Double the buffer size and retry
  63       _config_string_buffer_size *= 2;
  64       _config_string = REALLOC_C_HEAP_ARRAY(char, _config_string, _config_string_buffer_size, mtLogging);
  65       continue;
  66     }
  67     break;
  68   };
  69 
  70   offset = strlen(_config_string);
  71   for (;;) {
  72     int ret = jio_snprintf(_config_string + offset, _config_string_buffer_size - offset, "=%s,", LogLevel::name(level));
  73     if (ret == -1) {
  74       _config_string_buffer_size *= 2;
  75       _config_string = REALLOC_C_HEAP_ARRAY(char, _config_string, _config_string_buffer_size, mtLogging);
  76       continue;
  77     }
  78     break;
  79   }
  80 }








  61     if (ret == -1) {
  62       // Double the buffer size and retry
  63       _config_string_buffer_size *= 2;
  64       _config_string = REALLOC_C_HEAP_ARRAY(char, _config_string, _config_string_buffer_size, mtLogging);
  65       continue;
  66     }
  67     break;
  68   };
  69 
  70   offset = strlen(_config_string);
  71   for (;;) {
  72     int ret = jio_snprintf(_config_string + offset, _config_string_buffer_size - offset, "=%s,", LogLevel::name(level));
  73     if (ret == -1) {
  74       _config_string_buffer_size *= 2;
  75       _config_string = REALLOC_C_HEAP_ARRAY(char, _config_string, _config_string_buffer_size, mtLogging);
  76       continue;
  77     }
  78     break;
  79   }
  80 }
  81 
  82 void LogOutput::set_option_string(const char* string) {
  83   os::free(_option_string);
  84   _option_string = os::strdup_check_oom(string, mtLogging);
  85 }
  86 
< prev index next >