blob: 0ac3878d897f9f38ea8fa5609ce4e79cd71c5c1a [file] [log] [blame]
Matt Spinlerf61f2922020-06-23 11:32:49 -05001#pragma once
2
3#include <fstream>
4#include <optional>
5#include <string>
6
7namespace 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 */
17std::optional<std::string> getOSReleaseValue(const std::string& key);
18
Matt Spinler271d1432023-01-18 13:58:05 -060019/**
20 * @brief Synchronize unwritten journal messages to disk.
21 * @details This is the same implementation as the systemd command
22 * "journalctl --sync".
23 */
24void journalSync();
25
Matt Spinlerf61f2922020-06-23 11:32:49 -050026} // namespace phosphor::logging::util