< prev index next >
src/share/vm/logging/logFileOutput.hpp
Print this page
rev 10178 : [mq]: 8146879.archiving
@@ -32,10 +32,11 @@
// The log file output, with support for file rotation based on a target size.
class LogFileOutput : public LogFileStreamOutput {
private:
static const char* FileOpenMode;
+ static const char* ExistingFileModeKey;
static const char* FileCountOptionKey;
static const char* FileSizeOptionKey;
static const char* PidFilenamePlaceholder;
static const char* TimestampFilenamePlaceholder;
static const char* TimestampFormat;
@@ -57,15 +58,20 @@
size_t _current_size;
// Semaphore used for synchronizing file rotations and writes
Semaphore _rotation_semaphore;
+ enum ExistingFileMode {
+ Archive,
+ Append,
+ Truncate
+ } _existing_file_mode;
+
void archive();
void rotate();
- bool configure_rotation(const char* options);
+ bool configure(const char* options);
char *make_file_name(const char* file_name, const char* pid_string, const char* timestamp_string);
- static size_t parse_value(const char* value_str);
bool should_rotate() {
return _file_count > 0 && _rotate_size > 0 && _current_size >= _rotate_size;
}
< prev index next >