17 #ifndef CYBER_LOGGER_LOG_FILE_OBJECT_H_ 18 #define CYBER_LOGGER_LOG_FILE_OBJECT_H_ 25 #include "glog/logging.h" 37 using google::LogSeverity;
38 using google::NUM_SEVERITIES;
39 using std::ostringstream;
46 LogFileObject(LogSeverity severity,
const char* base_filename);
49 void Write(
bool force_flush,
51 const char* message,
int message_len)
override;
59 void Flush()
override;
64 std::lock_guard<std::mutex> lock(lock_);
76 static const uint32 kRolloverAttemptFrequency = 0x20;
79 bool base_filename_selected_;
80 string base_filename_;
81 string symlink_basename_;
82 string filename_extension_;
84 LogSeverity severity_;
85 uint32 bytes_since_flush_;
87 unsigned int rollover_attempt_;
88 int64 next_flush_time_;
94 bool CreateLogfile(
const string& time_pid_string);
101 #endif // CYBER_LOGGER_LOG_FILE_OBJECT_H_ int32_t int32
Definition: log_file_object.h:32
Definition: log_file_object.h:44
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
void SetSymlinkBasename(const char *symlink_basename)
int64_t int64
Definition: log_file_object.h:34
void Write(bool force_flush, time_t timestamp, const char *message, int message_len) override
const string & hostname()
void SetExtension(const char *ext)
uint64_t uint64
Definition: log_file_object.h:35
uint32 LogSize() override
Definition: log_file_object.h:63
void SetBasename(const char *basename)
uint32_t uint32
Definition: log_file_object.h:33
LogFileObject(LogSeverity severity, const char *base_filename)