--- old/src/share/vm/logging/logConfiguration.cpp 2015-10-16 22:52:22.557462700 +0900 +++ new/src/share/vm/logging/logConfiguration.cpp 2015-10-16 22:52:22.391462700 +0900 @@ -35,6 +35,7 @@ #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; @@ -351,3 +352,21 @@ "\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(); + } + } + } +} +