kytos-ng / of_core

Kytos Main OpenFlow Network Application (NApp)
MIT License
0 stars 5 forks source link

Print OFPT_ERROR messages with XID also in hexadecimal #18

Closed italovalcy closed 3 years ago

italovalcy commented 3 years ago

Currently, the OFPT_ERROR log messages include the XID in decimal format, but it would be nice to have it also in hexadecimal because many types of equipment have their logs in hexadecimal so it will make troubleshooting easier.

2021-08-03 00:58:54,845 - ERROR [kytos.napps.kytos/of_core] (Thread-91946) OFPT_ERROR: BadMatchCode.OFPBMC_BAD_FIELD error code received from switch 00:00:00:00:00:00:00:06 with xid 114602606

As from Jeronimo's (@jab1982) suggestion, should be printed like this:

2021-08-03 00:58:54,845 - ERROR [kytos.napps.kytos/of_core] (Thread-91946) OFPT_ERROR: BadMatchCode.OFPBMC_BAD_FIELD error code received from switch 00:00:00:00:00:00:00:06 with xid 114602606/0x6D4B26E