mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-18 07:00:34 +08:00
logger: restart on file write error
This can also happen if the maximum file size is reached.
This commit is contained in:
@@ -123,11 +123,13 @@ bool LogWriter::is_started(LogType type, Backend query_backend) const
|
||||
return false;
|
||||
}
|
||||
|
||||
void LogWriter::start_log_file(LogType type, const char *filename)
|
||||
bool LogWriter::start_log_file(LogType type, const char *filename)
|
||||
{
|
||||
if (_log_writer_file) {
|
||||
_log_writer_file->start_log(type, filename);
|
||||
return _log_writer_file->start_log(type, filename);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void LogWriter::stop_log_file(LogType type)
|
||||
@@ -195,5 +197,14 @@ void LogWriter::select_write_backend(Backend sel_backend)
|
||||
}
|
||||
}
|
||||
|
||||
bool LogWriter::had_file_write_error() const
|
||||
{
|
||||
if (_log_writer_file) {
|
||||
return _log_writer_file->had_write_error();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user