< prev index next >
src/share/vm/logging/logFileOutput.cpp
Print this page
rev 9850 : [mq]: 8146879
*** 135,144 ****
--- 135,148 ----
bool LogFileOutput::initialize(const char* options) {
if (!configure_rotation(options)) {
return false;
}
+
+ // Remove any existing log file in order to replace it (rather than append it)
+ remove(_file_name);
+
_stream = fopen(_file_name, FileOpenMode);
if (_stream == NULL) {
log_error(logging)("Could not open log file '%s' (%s).\n", _file_name, strerror(errno));
return false;
}
< prev index next >