1 #pragma once 2 3 #include <fstream> 4 #include <optional> 5 #include <string> 6 7 namespace phosphor::logging::util 8 { 9 10 /** 11 * @brief Return a value found in the /etc/os-release file 12 * 13 * @param[in] key - The key name, like "VERSION" 14 * 15 * @return std::optional<std::string> - The value 16 */ 17 std::optional<std::string> getOSReleaseValue(const std::string& key); 18 19 /** 20 * @brief Synchronize unwritten journal messages to disk. 21 * @details This is the same implementation as the systemd command 22 * "journalctl --sync". 23 */ 24 void journalSync(); 25 26 } // namespace phosphor::logging::util 27