summaryrefslogtreecommitdiffstats
path: root/elog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'elog.cpp')
-rw-r--r--elog.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/elog.cpp b/elog.cpp
index 5483851..27dfef5 100644
--- a/elog.cpp
+++ b/elog.cpp
@@ -5,9 +5,11 @@ namespace phosphor
{
namespace logging
{
-
-void commit(std::string&& e)
+namespace details
+{
+void commit(const char* name)
{
+ using phosphor::logging::log;
constexpr auto MAPPER_BUSNAME = "xyz.openbmc_project.ObjectMapper";
constexpr auto MAPPER_PATH = "/xyz/openbmc_project/object_mapper";
constexpr auto MAPPER_INTERFACE = "xyz.openbmc_project.ObjectMapper";
@@ -46,9 +48,16 @@ void commit(std::string&& e)
IFACE_INTERNAL,
"Commit");
uint64_t id = sdbusplus::server::transaction::get_id();
- m.append(id, std::forward<std::string>(e));
+ m.append(id, name);
b.call_noreply(m);
}
+} // namespace details
+
+void commit(std::string&& name)
+{
+ log<level::ERR>("method is deprecated, use commit() with exception type");
+ phosphor::logging::details::commit(name.c_str());
+}
} // namespace logging
} // namespace phosphor
OpenPOWER on IntegriCloud