Home
last modified time | relevance | path

Searched hist:acb7c106 (Results 1 – 6 of 6) sorted by relevance

/openbmc/phosphor-logging/extensions/openpower-pels/
H A Duser_data.hppacb7c106 Fri Jan 10 13:49:22 CST 2020 Matt Spinler <spinler@us.ibm.com> PEL: Print the JSON formatted UserData

Override the getJSON() function in the UserData section so it will
support peltool pretty printing when the data has been stored as JSON
(component phosphor-logging, subtype 1 as defined in
user_data_formats.hpp).

It first converts the original JSON string to a nlohmann::json object to
validate it is valid JSON and then uses nlohmann::json's stream <<
operator to convert it into a pretty string.

This also sets up a framework where other UserData parsing functions can
be called from, and it is all only compiled into peltool, and not into
phosphor-log-manager.

The UserData section created out of the OpenBMC event log's
AdditionalData property already makes use of this format.

Here are some example outputs. Note that the 'Data' key is added by
this code for JSON that isn't already an object (dict) to make it one.

"User Data": {
"OPERATION": "something",
"REGISTER_FFDC": "REG1=0x8|REG2=0x9|REG3=0x55",
"RETURN_VALUE": "-12",
"TIMEOUT_IN_MSEC": "100",
"_PID": "993"
},

"User Data": {
"Data": [
"OPERATION",
"REGISTER_FFDC",
"RETURN_VALUE",
"TIMEOUT_IN_MSEC",
"_PID"
]
},

"User Data": {
"Data": "This is a string"
}

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I7b034ac24339b5b019db3b57d8e71cb03559363e
H A Duser_data_json.hppacb7c106 Fri Jan 10 13:49:22 CST 2020 Matt Spinler <spinler@us.ibm.com> PEL: Print the JSON formatted UserData

Override the getJSON() function in the UserData section so it will
support peltool pretty printing when the data has been stored as JSON
(component phosphor-logging, subtype 1 as defined in
user_data_formats.hpp).

It first converts the original JSON string to a nlohmann::json object to
validate it is valid JSON and then uses nlohmann::json's stream <<
operator to convert it into a pretty string.

This also sets up a framework where other UserData parsing functions can
be called from, and it is all only compiled into peltool, and not into
phosphor-log-manager.

The UserData section created out of the OpenBMC event log's
AdditionalData property already makes use of this format.

Here are some example outputs. Note that the 'Data' key is added by
this code for JSON that isn't already an object (dict) to make it one.

"User Data": {
"OPERATION": "something",
"REGISTER_FFDC": "REG1=0x8|REG2=0x9|REG3=0x55",
"RETURN_VALUE": "-12",
"TIMEOUT_IN_MSEC": "100",
"_PID": "993"
},

"User Data": {
"Data": [
"OPERATION",
"REGISTER_FFDC",
"RETURN_VALUE",
"TIMEOUT_IN_MSEC",
"_PID"
]
},

"User Data": {
"Data": "This is a string"
}

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I7b034ac24339b5b019db3b57d8e71cb03559363e
H A Duser_data.cppacb7c106 Fri Jan 10 13:49:22 CST 2020 Matt Spinler <spinler@us.ibm.com> PEL: Print the JSON formatted UserData

Override the getJSON() function in the UserData section so it will
support peltool pretty printing when the data has been stored as JSON
(component phosphor-logging, subtype 1 as defined in
user_data_formats.hpp).

It first converts the original JSON string to a nlohmann::json object to
validate it is valid JSON and then uses nlohmann::json's stream <<
operator to convert it into a pretty string.

This also sets up a framework where other UserData parsing functions can
be called from, and it is all only compiled into peltool, and not into
phosphor-log-manager.

The UserData section created out of the OpenBMC event log's
AdditionalData property already makes use of this format.

Here are some example outputs. Note that the 'Data' key is added by
this code for JSON that isn't already an object (dict) to make it one.

"User Data": {
"OPERATION": "something",
"REGISTER_FFDC": "REG1=0x8|REG2=0x9|REG3=0x55",
"RETURN_VALUE": "-12",
"TIMEOUT_IN_MSEC": "100",
"_PID": "993"
},

"User Data": {
"Data": [
"OPERATION",
"REGISTER_FFDC",
"RETURN_VALUE",
"TIMEOUT_IN_MSEC",
"_PID"
]
},

"User Data": {
"Data": "This is a string"
}

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I7b034ac24339b5b019db3b57d8e71cb03559363e
H A Duser_data_json.cppacb7c106 Fri Jan 10 13:49:22 CST 2020 Matt Spinler <spinler@us.ibm.com> PEL: Print the JSON formatted UserData

Override the getJSON() function in the UserData section so it will
support peltool pretty printing when the data has been stored as JSON
(component phosphor-logging, subtype 1 as defined in
user_data_formats.hpp).

It first converts the original JSON string to a nlohmann::json object to
validate it is valid JSON and then uses nlohmann::json's stream <<
operator to convert it into a pretty string.

This also sets up a framework where other UserData parsing functions can
be called from, and it is all only compiled into peltool, and not into
phosphor-log-manager.

The UserData section created out of the OpenBMC event log's
AdditionalData property already makes use of this format.

Here are some example outputs. Note that the 'Data' key is added by
this code for JSON that isn't already an object (dict) to make it one.

"User Data": {
"OPERATION": "something",
"REGISTER_FFDC": "REG1=0x8|REG2=0x9|REG3=0x55",
"RETURN_VALUE": "-12",
"TIMEOUT_IN_MSEC": "100",
"_PID": "993"
},

"User Data": {
"Data": [
"OPERATION",
"REGISTER_FFDC",
"RETURN_VALUE",
"TIMEOUT_IN_MSEC",
"_PID"
]
},

"User Data": {
"Data": "This is a string"
}

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I7b034ac24339b5b019db3b57d8e71cb03559363e
H A Dpel.hppacb7c106 Fri Jan 10 13:49:22 CST 2020 Matt Spinler <spinler@us.ibm.com> PEL: Print the JSON formatted UserData

Override the getJSON() function in the UserData section so it will
support peltool pretty printing when the data has been stored as JSON
(component phosphor-logging, subtype 1 as defined in
user_data_formats.hpp).

It first converts the original JSON string to a nlohmann::json object to
validate it is valid JSON and then uses nlohmann::json's stream <<
operator to convert it into a pretty string.

This also sets up a framework where other UserData parsing functions can
be called from, and it is all only compiled into peltool, and not into
phosphor-log-manager.

The UserData section created out of the OpenBMC event log's
AdditionalData property already makes use of this format.

Here are some example outputs. Note that the 'Data' key is added by
this code for JSON that isn't already an object (dict) to make it one.

"User Data": {
"OPERATION": "something",
"REGISTER_FFDC": "REG1=0x8|REG2=0x9|REG3=0x55",
"RETURN_VALUE": "-12",
"TIMEOUT_IN_MSEC": "100",
"_PID": "993"
},

"User Data": {
"Data": [
"OPERATION",
"REGISTER_FFDC",
"RETURN_VALUE",
"TIMEOUT_IN_MSEC",
"_PID"
]
},

"User Data": {
"Data": "This is a string"
}

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I7b034ac24339b5b019db3b57d8e71cb03559363e
H A Dpel.cppacb7c106 Fri Jan 10 13:49:22 CST 2020 Matt Spinler <spinler@us.ibm.com> PEL: Print the JSON formatted UserData

Override the getJSON() function in the UserData section so it will
support peltool pretty printing when the data has been stored as JSON
(component phosphor-logging, subtype 1 as defined in
user_data_formats.hpp).

It first converts the original JSON string to a nlohmann::json object to
validate it is valid JSON and then uses nlohmann::json's stream <<
operator to convert it into a pretty string.

This also sets up a framework where other UserData parsing functions can
be called from, and it is all only compiled into peltool, and not into
phosphor-log-manager.

The UserData section created out of the OpenBMC event log's
AdditionalData property already makes use of this format.

Here are some example outputs. Note that the 'Data' key is added by
this code for JSON that isn't already an object (dict) to make it one.

"User Data": {
"OPERATION": "something",
"REGISTER_FFDC": "REG1=0x8|REG2=0x9|REG3=0x55",
"RETURN_VALUE": "-12",
"TIMEOUT_IN_MSEC": "100",
"_PID": "993"
},

"User Data": {
"Data": [
"OPERATION",
"REGISTER_FFDC",
"RETURN_VALUE",
"TIMEOUT_IN_MSEC",
"_PID"
]
},

"User Data": {
"Data": "This is a string"
}

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I7b034ac24339b5b019db3b57d8e71cb03559363e