blob: 72abf12cf663b258f0ff98ac15d1c63aadc755cd [file] [log] [blame]
James Kuszmaul011b67a2019-12-15 12:52:34 -08001#ifndef AOS_LOGGING_LOG_NAMER_H_
2#define AOS_LOGGING_LOG_NAMER_H_
3
4#include <string>
5
6namespace aos {
7namespace logging {
8// Returns the correct filename to log to, blocking until the usb drive
9// filesystem mounts, incrementing the number on the end of the filename, and
10// setting up a symlink at basename-current.
11// basename is the prefix to use for the logs within the usb drive. E.g., on a
12// typical roborio setup, calling GetLogName("abc") will return a filename of
13// the form "/media/sda1/abc-123" and setup a symlink pointing to it at
14// "/media/sda1/abc-current".
15std::string GetLogName(const char *basename);
16} // namespace logging
17} // namespace aos
18
19#endif // AOS_LOGGING_LOG_NAMER_H_