blob: 5163c4e5b95a0c3be5e3792b6adcaec695761661 [file] [log] [blame]
Ben Tynerb1ebfcb2020-05-08 18:52:48 -05001#include <attn/attn_logging.hpp>
Ben Tyner9ae5ca42020-02-28 13:13:50 -06002
3#include <iostream>
4
5namespace attn
6{
7
8/** @brief Log message of type INFO using stdout */
9template <>
Ben Tynerb1ebfcb2020-05-08 18:52:48 -050010void trace<INFO>(const char* i_message)
Ben Tyner9ae5ca42020-02-28 13:13:50 -060011{
Ben Tynerb1ebfcb2020-05-08 18:52:48 -050012 std::cout << "trace: " << i_message << std::endl;
13}
14
15void eventCheckstop(std::map<std::string, std::string>& i_errors)
16{
17 std::string signature = i_errors.begin()->first;
18 std::string chip = i_errors.begin()->second;
19
20 std::cout << "event: checkstop, signature = " << signature
21 << ", chip = " << chip << std::endl;
22}
23
24void eventHwDiagsFail(int i_error)
25{
26 std::cout << "event: hwdiags fail " << i_error << std::endl;
27}
28
29void eventAttentionFail(int i_error)
30{
31 std::cout << "event: attention fail" << i_error << std::endl;
32}
33
Ben Tyner40717722020-09-23 09:43:20 -050034void eventTerminate(std::map<std::string, std::string> i_additionalData)
Ben Tynerb1ebfcb2020-05-08 18:52:48 -050035{
36 std::cout << "event: terminate" << std::endl;
Ben Tyner40717722020-09-23 09:43:20 -050037
38 std::map<std::string, std::string>::iterator itr;
39 for (itr = i_additionalData.begin(); itr != i_additionalData.end(); ++itr)
40 {
41 std::cout << '\t' << itr->first << '\t' << itr->second << '\n';
42 }
43 std::cout << std::endl;
Ben Tynerb1ebfcb2020-05-08 18:52:48 -050044}
Ben Tyner40717722020-09-23 09:43:20 -050045
Ben Tynerb1ebfcb2020-05-08 18:52:48 -050046void eventVital()
47{
48 std::cout << "event: vital" << std::endl;
Ben Tyner9ae5ca42020-02-28 13:13:50 -060049}
50
51} // namespace attn