17#ifndef CYBER_LOGGER_LOG_FILE_OBJECT_H_
18#define CYBER_LOGGER_LOG_FILE_OBJECT_H_
25#include "glog/logging.h"
37using google::LogSeverity;
38using google::NUM_SEVERITIES;
39using 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_;
87 unsigned int rollover_attempt_;
88 int64 next_flush_time_;
94 bool CreateLogfile(
const string& time_pid_string);
const string & hostname()
uint32 LogSize() override
void SetExtension(const char *ext)
void SetBasename(const char *basename)
void Write(bool force_flush, time_t timestamp, const char *message, int message_len) override
void SetSymlinkBasename(const char *symlink_basename)