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