James Kuszmaul | beaa3c8 | 2023-09-07 11:11:27 -0700 | [diff] [blame] | 1 | #ifndef AOS_EVENTS_LOGGING_LOGFILE_VALIDATOR_H_ |
| 2 | #define AOS_EVENTS_LOGGING_LOGFILE_VALIDATOR_H_ |
| 3 | #include "aos/events/logging/logfile_sorting.h" |
| 4 | namespace aos::logger { |
| 5 | // Attempts to validate that a log is readable without actually running the full |
| 6 | // LogReader. This aims to allow the user to preempt fatal crashes that can |
| 7 | // occur when trying to replay a log. |
| 8 | // Returns true if successful. |
| 9 | bool MultiNodeLogIsReadable(const LogFilesContainer &log_files, |
| 10 | bool skip_order_validation = false); |
| 11 | |
| 12 | // Returns true if the requested log is either a single-node log or if the |
| 13 | // MultiNodeLogIsReadable() returns true. |
| 14 | bool LogIsReadableIfMultiNode(const LogFilesContainer &log_files); |
| 15 | } // namespace aos::logger |
| 16 | #endif // AOS_EVENTS_LOGGING_LOGFILE_VALIDATOR_H_ |