< prev index next >

src/share/vm/logging/logConfiguration.cpp

Print this page
rev 11857 : imported patch 8150823

*** 241,270 **** output->set_config_string("all=off"); } } void LogConfiguration::disable_output(size_t idx) { LogOutput* out = _outputs[idx]; // Remove the output from all tagsets. for (LogTagSet* ts = LogTagSet::first(); ts != NULL; ts = ts->next()) { ts->set_output_level(out, LogLevel::Off); ts->update_decorators(); } // Delete the output unless stdout/stderr if (out != LogOutput::Stderr && out != LogOutput::Stdout) { ! delete_output(find_output(out->name())); } else { out->set_config_string("all=off"); } } void LogConfiguration::disable_logging() { ConfigurationLock cl; ! for (size_t i = 0; i < _n_outputs; i++) { ! disable_output(i); } notify_update_listeners(); } void LogConfiguration::configure_stdout(LogLevelType level, bool exact_match, ...) { --- 241,271 ---- output->set_config_string("all=off"); } } void LogConfiguration::disable_output(size_t idx) { + assert(idx < _n_outputs, "invalid index: " SIZE_FORMAT " (_n_outputs: " SIZE_FORMAT ")", idx, _n_outputs); LogOutput* out = _outputs[idx]; // Remove the output from all tagsets. for (LogTagSet* ts = LogTagSet::first(); ts != NULL; ts = ts->next()) { ts->set_output_level(out, LogLevel::Off); ts->update_decorators(); } // Delete the output unless stdout/stderr if (out != LogOutput::Stderr && out != LogOutput::Stdout) { ! delete_output(idx); } else { out->set_config_string("all=off"); } } void LogConfiguration::disable_logging() { ConfigurationLock cl; ! for (size_t i = _n_outputs; i > 0; i--) { ! disable_output(i - 1); } notify_update_listeners(); } void LogConfiguration::configure_stdout(LogLevelType level, bool exact_match, ...) {
< prev index next >