blob: c902a09d38565ee5263cc6414533846a2e90b11c [file] [log] [blame]
Alexander Hansenb80ba2e2024-11-18 12:24:35 +01001#pragma once
2
3#include <nlohmann/json.hpp>
4
Ed Tanous4a19a7b2025-01-27 10:44:15 -08005#include <cstdint>
Alexander Hansenb80ba2e2024-11-18 12:24:35 +01006#include <span>
7#include <string>
8#include <string_view>
Ed Tanousd7857202025-01-28 15:32:26 -08009#include <vector>
Alexander Hansenb80ba2e2024-11-18 12:24:35 +010010
11namespace redfish
12{
13
14namespace event_log
15{
16
17bool getUniqueEntryID(const std::string& logEntry, std::string& entryID);
18
19int getEventLogParams(const std::string& logEntry, std::string& timestamp,
20 std::string& messageID,
21 std::vector<std::string>& messageArgs);
22
Ed Tanous4a19a7b2025-01-27 10:44:15 -080023int formatEventLogEntry(uint64_t eventId, const std::string& logEntryID,
24 const std::string& messageID,
25 std::span<std::string_view> messageArgs,
26 std::string timestamp, const std::string& customText,
27 nlohmann::json::object_t& logEntryJson);
Alexander Hansenb80ba2e2024-11-18 12:24:35 +010028
29} // namespace event_log
30
31} // namespace redfish