blob: 814b89edbe602211dd5c704ab74202a062cec944 [file] [log] [blame]
James Kuszmaulbeaa3c82023-09-07 11:11:27 -07001#ifndef AOS_EVENTS_LOGGING_LOGFILE_VALIDATOR_H_
2#define AOS_EVENTS_LOGGING_LOGFILE_VALIDATOR_H_
3#include "aos/events/logging/logfile_sorting.h"
4namespace 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.
9bool 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.
14bool LogIsReadableIfMultiNode(const LogFilesContainer &log_files);
15} // namespace aos::logger
16#endif // AOS_EVENTS_LOGGING_LOGFILE_VALIDATOR_H_