Overview: This PR introduces a new macro, LogPrintLevel, that allows developers to add logs with the severity level. Additionally, it will also print the log category if it is specified.
Sample log:
2022-03-04T16:41:15Z [opencon] [net:debug] trying connection XX.XX.XXX.XXX:YYYYY lastseen=2.7hrs
This is a backport of core#24464 and core#29419
https://github.com/bitcoin/bitcoin/pull/24464/commits/a8290649a6578df120a71c9493acdf071e010d96
https://github.com/bitcoin/bitcoin/pull/29419/commits/d3b3af90343b7671231afd7dff87e87ff86d31d7 (dedup category names and improve logging.cpp)
https://github.com/bitcoin/bitcoin/pull/24464/commits/e11cdc930375eaec8d737e116138b2f2018c099f