Refactor to pass errors to watch through config YAML
Add errors to watch for through error YAML file
Add support for checkstop error type
Tested:
Generating dumps for elog, core, checkstop type errors.
Change-Id: Idd00ace2e3d0c472a74ec142e6d150e55e843a6f
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
diff --git a/dump_manager.cpp b/dump_manager.cpp
index d9326e0..21fca8a 100644
--- a/dump_manager.cpp
+++ b/dump_manager.cpp
@@ -40,12 +40,6 @@
uint32_t Manager::captureDump(Type type,
const std::vector<std::string>& fullPaths)
{
- // Type to dreport type string map
- static const std::map<Type, std::string> typeMap = {
- {Type::ApplicationCored, "core"},
- {Type::UserRequested, "user"},
- {Type::InternalFailure, "elog"}};
-
// Get Dump size.
auto size = getAllowedSize();
@@ -58,7 +52,7 @@
dumpPath /= id;
// get dreport type map entry
- auto tempType = typeMap.find(type);
+ auto tempType = TypeMap.find(type);
execl("/usr/bin/dreport", "dreport", "-d", dumpPath.c_str(), "-i",
id.c_str(), "-s", std::to_string(size).c_str(), "-q", "-v", "-p",