1 #include <phosphor-logging/elog-errors.hpp> 2 #include <phosphor-logging/elog.hpp> 3 #include <sdbusplus/exception.hpp> 4 5 #include <iostream> 6 7 using namespace phosphor::logging; 8 9 int main(int argc, char** argv) 10 { 11 if (2 != argc) 12 { 13 std::cerr << "usage: callout-test <sysfs path>" << std::endl; 14 return -1; 15 } 16 17 using namespace example::xyz::openbmc_project::example::elog; 18 try 19 { 20 elog<TestCallout>(TestCallout::DEV_ADDR(0xDEADEAD), 21 TestCallout::CALLOUT_ERRNO_TEST(0), 22 TestCallout::CALLOUT_DEVICE_PATH_TEST(argv[1])); 23 } 24 catch (const TestCallout& e) 25 { 26 commit(e.name()); 27 } 28 29 return 0; 30 } 31