Return entryID on commiting logs
Let the Commit()/CommitWithLvl() methods return entryID, so that the
caller of commit()/report() could get the entryID directly without
querying the logging service again.
This is useful in cases that the caller needs to know the entryID of the
commit()/report() events.
Tested: Manually verify the report() returns the correct entryID.
Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: Ieb22d32d4e9242ec46b799f6e98ca3d49e7590b9
diff --git a/log_manager.hpp b/log_manager.hpp
index 7437f4e..e04c6b7 100644
--- a/log_manager.hpp
+++ b/log_manager.hpp
@@ -79,7 +79,7 @@
* @param[in] errMsg - The error exception message associated with the
* error log to be committed.
*/
- void commit(uint64_t transactionId, std::string errMsg) override;
+ uint32_t commit(uint64_t transactionId, std::string errMsg) override;
/*
* @fn commit()
@@ -92,8 +92,8 @@
* error log to be committed.
* @param[in] errLvl - level of the error
*/
- void commitWithLvl(uint64_t transactionId, std::string errMsg,
- uint32_t errLvl) override;
+ uint32_t commitWithLvl(uint64_t transactionId, std::string errMsg,
+ uint32_t errLvl) override;
/** @brief Erase specified entry d-bus object
*