42 char LogFileOutput::_pid_str[PidBufferSize]; |
42 char LogFileOutput::_pid_str[PidBufferSize]; |
43 char LogFileOutput::_vm_start_time_str[StartTimeBufferSize]; |
43 char LogFileOutput::_vm_start_time_str[StartTimeBufferSize]; |
44 |
44 |
45 LogFileOutput::LogFileOutput(const char* name) |
45 LogFileOutput::LogFileOutput(const char* name) |
46 : LogFileStreamOutput(NULL), _name(os::strdup_check_oom(name, mtLogging)), |
46 : LogFileStreamOutput(NULL), _name(os::strdup_check_oom(name, mtLogging)), |
47 _file_name(NULL), _archive_name(NULL), _archive_name_len(0), |
47 _file_name(NULL), _archive_name(NULL), _current_file(0), |
48 _rotate_size(DefaultFileSize), _file_count(DefaultFileCount), |
48 _file_count(DefaultFileCount), _archive_name_len(0), |
49 _current_size(0), _current_file(0), _rotation_semaphore(1) { |
49 _rotate_size(DefaultFileSize), _current_size(0), _rotation_semaphore(1) { |
50 assert(strstr(name, Prefix) == name, "invalid output name '%s': missing prefix: %s", name, Prefix); |
50 assert(strstr(name, Prefix) == name, "invalid output name '%s': missing prefix: %s", name, Prefix); |
51 _file_name = make_file_name(name + strlen(Prefix), _pid_str, _vm_start_time_str); |
51 _file_name = make_file_name(name + strlen(Prefix), _pid_str, _vm_start_time_str); |
52 } |
52 } |
53 |
53 |
54 void LogFileOutput::set_file_name_parameters(jlong vm_start_time) { |
54 void LogFileOutput::set_file_name_parameters(jlong vm_start_time) { |