< prev index next >

src/share/vm/logging/logConfiguration.cpp

Print this page

        

*** 33,42 **** --- 33,43 ---- #include "logging/logTagSet.hpp" #include "memory/allocation.inline.hpp" #include "memory/resourceArea.hpp" #include "runtime/os.inline.hpp" #include "utilities/globalDefinitions.hpp" + #include "utilities/defaultStream.hpp" LogOutput** LogConfiguration::_outputs = NULL; size_t LogConfiguration::_n_outputs = 0; void LogConfiguration::post_initialize() {
*** 349,353 **** --- 350,372 ---- " -Xlog:disable -Xlog:rt=trace:rttrace.txt\n" "\t Turn off all logging, including warnings and errors,\n" "\t and then enable messages tagged with 'rt' using 'trace' level to file 'rttrace.txt'.\n"); } + + void LogConfiguration::rotate_all_logfile() { + for (size_t idx = 0; idx < _n_outputs; idx++) { + if ((strcmp(_outputs[idx]->name(), "stdout") != 0) && + (strcmp(_outputs[idx]->name(), "stderr") != 0)) { + LogFileOutput *logger = (LogFileOutput *)_outputs[idx]; + + if (logger->get_archive_name() == NULL) { + jio_fprintf(defaultStream::error_stream(), + "Could not rotate log file '%s' because filecount option is not set.\n", + logger->name()); + } else { + logger->rotate(); + } + } + } + } +
< prev index next >