Some error/warning logging in AMF currently does not give enough information about unexpected situation.
For example:
1- LOG_ER("%s: invalid node state %u", FUNCTION, node->node_state);
-> it should tell which node name/id is in invalid state
2- LOG_ER("Wrong sg fsm state %u", su->sg_of_su->sg_fsm_state);
-> it should tell the sg name is in wrong fsm state
3- LOG_ER("Invalid node_name. Check node_id");
-> it should tell the node name in msg that amfd can not find
4- LOG_ER("Internal error, could not send message to avnd");
-> it should tell at least node id of which avnd that msg can not be sent to
5- LOG_ER("%s: no susis", FUNCTION);
-> which su has no susis
6- LOG_ER("avnd_di_msg_send FAILED");
-> it's helpful to know which msg is failed to sent out, so we can know which msg is missing at amfd
...
As the logging is informative, it could help debugging in running system where the fault sometimes could not be reproduced (so there would not be trace file in next fault reproduction), or we can identify the fault straight away in some cases without tracing enquiries
This ticket will scan through amfd/amfnd file by file and add more information in error/waring cases. It's started at 5.1 FC and could be continued in next releases. Some rules:
1. Log must tell the object that error happens on
2. Log must give error code if it fails at checking return code
3. When failed to send msg, log the msg type and object that msg carries (if any)
4. ...
Diff:
Diff:
changeset: 8375:d65c5d3798c7
tag: tip
user: Nagendra Kumarnagendra.k@oracle.com
date: Tue Nov 29 11:50:26 2016 +0530
summary: amf: add more information in logging [#1918]
[staging:d65c5d]
Related
Tickets:
#1918