17 #ifndef _GAZEBO_UTIL_LOGRECORD_HH_ 18 #define _GAZEBO_UTIL_LOGRECORD_HH_ 27 #define GZ_LOG_VERSION "1.0" 34 class LogRecordPrivate;
70 public:
bool Init(
const std::string &_subdir);
84 public:
void Add(
const std::string &_name,
const std::string &_filename,
85 std::function<
bool (std::ostringstream &)> _logCallback);
95 public:
bool Remove(
const std::string &_name);
101 public:
void Notify();
107 public:
void SetPaused(
const bool _paused);
118 public:
bool Paused()
const;
123 public:
bool IsReadyToStart()
const;
132 public:
bool Running()
const;
137 public:
bool Start(
const std::string &_encoding=
"zlib",
138 const std::string &_path=
"");
149 public:
const std::string &Encoding()
const;
155 public: std::string GetFilename(
const std::string &_name =
"")
const 161 public: std::string Filename(
const std::string &_name =
"")
const;
167 public:
unsigned int GetFileSize(
const std::string &_name =
"")
const 173 public:
unsigned int FileSize(
const std::string &_name =
"")
const;
177 public:
void SetBasePath(
const std::string &_path);
186 public: std::string BasePath()
const;
207 public:
bool FirstUpdate()
const;
211 public:
void Write(
const bool _force =
false);
220 public:
unsigned int BufferSize()
const;
226 private:
void Update();
229 private:
void RunUpdate();
232 private:
void RunWrite();
235 private:
void ClearLogs();
238 private:
void PublishLogStatus();
242 private:
void OnLogControl(ConstLogControlPtr &_data);
247 private:
void Cleanup();
250 private:
void OnPause(
const bool _pause);
257 private: std::unique_ptr<LogRecordPrivate> dataPtr;
Forward declarations for the common classes.
Definition: Animation.hh:33
#define GAZEBO_DEPRECATED(version)
Definition: CommonTypes.hh:48
Singleton template class.
Definition: SingletonT.hh:33
addtogroup gazebo_util
Definition: LogRecord.hh:56
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
A Time class, can be used to hold wall- or sim-time.
Definition: Time.hh:44