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