47 #ifdef WINDOWS_LOGGING 61 #ifndef WINDOWS_LOGGING 62 #define otLogFuncEntry() 63 #define otLogFuncEntryMsg(aFormat, ...) 64 #define otLogFuncExit() 65 #define otLogFuncExitMsg(aFormat, ...) 66 #define otLogFuncExitErr(error) 80 #if OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_CRIT 81 #define otLogCrit(aInstance, aRegion, aFormat, ...) \ 82 _otLogFormatter(aInstance, OT_LOG_LEVEL_CRIT, aRegion, aFormat, ## __VA_ARGS__) 84 #define otLogCrit(aInstance, aRegion, aFormat, ...) 98 #if OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_WARN 99 #define otLogWarn(aInstance, aRegion, aFormat, ...) \ 100 _otLogFormatter(aInstance, OT_LOG_LEVEL_WARN, aRegion, aFormat, ## __VA_ARGS__) 102 #define otLogWarn(aInstance, aRegion, aFormat, ...) 116 #if OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_INFO 117 #define otLogInfo(aInstance, aRegion, aFormat, ...) \ 118 _otLogFormatter(aInstance, OT_LOG_LEVEL_INFO, aRegion, aFormat, ## __VA_ARGS__) 120 #define otLogInfo(aInstance, aRegion, aFormat, ...) 134 #if OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_DEBG 135 #define otLogDebg(aInstance, aRegion, aFormat, ...) \ 136 _otLogFormatter(aInstance, OT_LOG_LEVEL_DEBG, aRegion, aFormat, ## __VA_ARGS__) 138 #define otLogDebg(aInstance, aRegion, aFormat, ...) 141 #ifndef WINDOWS_LOGGING 186 #if OPENTHREAD_CONFIG_LOG_API == 1 187 #define otLogCritApi(aInstance, aFormat, ...) otLogCrit(&aInstance, OT_LOG_REGION_API, aFormat, ## __VA_ARGS__) 188 #define otLogWarnApi(aInstance, aFormat, ...) otLogWarn(&aInstance, OT_LOG_REGION_API, aFormat, ## __VA_ARGS__) 189 #define otLogInfoApi(aInstance, aFormat, ...) otLogInfo(&aInstance, OT_LOG_REGION_API, aFormat, ## __VA_ARGS__) 190 #define otLogDebgApi(aInstance, aFormat, ...) otLogDebg(&aInstance, OT_LOG_REGION_API, aFormat, ## __VA_ARGS__) 192 #define otLogCritApi(aInstance, aFormat, ...) 193 #define otLogWarnApi(aInstance, aFormat, ...) 194 #define otLogInfoApi(aInstance, aFormat, ...) 195 #define otLogDebgApi(aInstance, aFormat, ...) 242 #if OPENTHREAD_CONFIG_LOG_MLE == 1 243 #define otLogCritMeshCoP(aInstance, aFormat, ...) \ 244 otLogCrit(&aInstance, OT_LOG_REGION_MESH_COP, aFormat, ## __VA_ARGS__) 245 #define otLogWarnMeshCoP(aInstance, aFormat, ...) \ 246 otLogWarn(&aInstance, OT_LOG_REGION_MESH_COP, aFormat, ## __VA_ARGS__) 247 #define otLogInfoMeshCoP(aInstance, aFormat, ...) \ 248 otLogInfo(&aInstance, OT_LOG_REGION_MESH_COP, aFormat, ## __VA_ARGS__) 249 #define otLogDebgMeshCoP(aInstance, aFormat, ...) \ 250 otLogDebg(&aInstance, OT_LOG_REGION_MESH_COP, aFormat, ## __VA_ARGS__) 252 #define otLogCritMeshCoP(aInstance, aFormat, ...) 253 #define otLogWarnMeshCoP(aInstance, aFormat, ...) 254 #define otLogInfoMeshCoP(aInstance, aFormat, ...) 255 #define otLogDebgMeshCoP(aInstance, aFormat, ...) 258 #define otLogCritMbedTls(aInstance, aFormat, ...) otLogCritMeshCoP(aInstance, aFormat, ## __VA_ARGS__) 259 #define otLogWarnMbedTls(aInstance, aFormat, ...) otLogWarnMeshCoP(aInstance, aFormat, ## __VA_ARGS__) 260 #define otLogInfoMbedTls(aInstance, aFormat, ...) otLogInfoMeshCoP(aInstance, aFormat, ## __VA_ARGS__) 261 #define otLogDebgMbedTls(aInstance, aFormat, ...) otLogDebgMeshCoP(aInstance, aFormat, ## __VA_ARGS__) 307 #if OPENTHREAD_CONFIG_LOG_MLE == 1 308 #define otLogCritMle(aInstance, aFormat, ...) otLogCrit(&aInstance, OT_LOG_REGION_MLE, aFormat, ## __VA_ARGS__) 309 #define otLogWarnMle(aInstance, aFormat, ...) otLogWarn(&aInstance, OT_LOG_REGION_MLE, aFormat, ## __VA_ARGS__) 310 #define otLogWarnMleErr(aInstance, aError, aFormat, ...) \ 311 otLogWarn(&aInstance, OT_LOG_REGION_MLE, "Error %s: " aFormat, otThreadErrorToString(aError), ## __VA_ARGS__) 312 #define otLogInfoMle(aInstance, aFormat, ...) otLogInfo(&aInstance, OT_LOG_REGION_MLE, aFormat, ## __VA_ARGS__) 313 #define otLogDebgMle(aInstance, aFormat, ...) otLogDebg(&aInstance, OT_LOG_REGION_MLE, aFormat, ## __VA_ARGS__) 315 #define otLogCritMle(aInstance, aFormat, ...) 316 #define otLogWarnMle(aInstance, aFormat, ...) 317 #define otLogWarnMleErr(aInstance, aError, aFormat, ...) 318 #define otLogInfoMle(aInstance, aFormat, ...) 319 #define otLogDebgMle(aInstance, aFormat, ...) 366 #if OPENTHREAD_CONFIG_LOG_ARP == 1 367 #define otLogCritArp(aInstance, aFormat, ...) otLogCrit(&aInstance, OT_LOG_REGION_ARP, aFormat, ## __VA_ARGS__) 368 #define otLogWarnArp(aInstance, aFormat, ...) otLogWarn(&aInstance, OT_LOG_REGION_ARP, aFormat, ## __VA_ARGS__) 369 #define otLogInfoArp(aInstance, aFormat, ...) otLogInfo(&aInstance, OT_LOG_REGION_ARP, aFormat, ## __VA_ARGS__) 370 #define otLogDebgArp(aInstance, aFormat, ...) otLogDebg(&aInstance, OT_LOG_REGION_ARP, aFormat, ## __VA_ARGS__) 372 #define otLogCritArp(aInstance, aFormat, ...) 373 #define otLogWarnArp(aInstance, aFormat, ...) 374 #define otLogInfoArp(aInstance, aFormat, ...) 375 #define otLogDebgArp(aInstance, aFormat, ...) 421 #if OPENTHREAD_CONFIG_LOG_NETDATA == 1 422 #define otLogCritNetData(aInstance, aFormat, ...) \ 423 otLogCrit(&aInstance, OT_LOG_REGION_NET_DATA, aFormat, ## __VA_ARGS__) 424 #define otLogWarnNetData(aInstance, aFormat, ...) \ 425 otLogWarn(&aInstance, OT_LOG_REGION_NET_DATA, aFormat, ## __VA_ARGS__) 426 #define otLogInfoNetData(aInstance, aFormat, ...) \ 427 otLogInfo(&aInstance, OT_LOG_REGION_NET_DATA, aFormat, ## __VA_ARGS__) 428 #define otLogDebgNetData(aInstance, aFormat, ...) \ 429 otLogDebg(&aInstance, OT_LOG_REGION_NET_DATA, aFormat, ## __VA_ARGS__) 431 #define otLogCritNetData(aInstance, aFormat, ...) 432 #define otLogWarnNetData(aInstance, aFormat, ...) 433 #define otLogInfoNetData(aInstance, aFormat, ...) 434 #define otLogDebgNetData(aInstance, aFormat, ...) 480 #if OPENTHREAD_CONFIG_LOG_ICMP == 1 481 #define otLogCritIcmp(aInstance, aFormat, ...) otLogCrit(&aInstance, OT_LOG_REGION_ICMP, aFormat, ## __VA_ARGS__) 482 #define otLogWarnIcmp(aInstance, aFormat, ...) otLogWarn(&aInstance, OT_LOG_REGION_ICMP, aFormat, ## __VA_ARGS__) 483 #define otLogInfoIcmp(aInstance, aFormat, ...) otLogInfo(&aInstance, OT_LOG_REGION_ICMP, aFormat, ## __VA_ARGS__) 484 #define otLogDebgIcmp(aInstance, aFormat, ...) otLogDebg(&aInstance, OT_LOG_REGION_ICMP, aFormat, ## __VA_ARGS__) 486 #define otLogCritIcmp(aInstance, aFormat, ...) 487 #define otLogWarnIcmp(aInstance, aFormat, ...) 488 #define otLogInfoIcmp(aInstance, aFormat, ...) 489 #define otLogDebgIcmp(aInstance, aFormat, ...) 535 #if OPENTHREAD_CONFIG_LOG_IP6 == 1 536 #define otLogCritIp6(aInstance, aFormat, ...) otLogCrit(&aInstance, OT_LOG_REGION_IP6, aFormat, ## __VA_ARGS__) 537 #define otLogWarnIp6(aInstance, aFormat, ...) otLogWarn(&aInstance, OT_LOG_REGION_IP6, aFormat, ## __VA_ARGS__) 538 #define otLogInfoIp6(aInstance, aFormat, ...) otLogInfo(&aInstance, OT_LOG_REGION_IP6, aFormat, ## __VA_ARGS__) 539 #define otLogDebgIp6(aInstance, aFormat, ...) otLogDebg(&aInstance, OT_LOG_REGION_IP6, aFormat, ## __VA_ARGS__) 541 #define otLogCritIp6(aInstance, aFormat, ...) 542 #define otLogWarnIp6(aInstance, aFormat, ...) 543 #define otLogInfoIp6(aInstance, aFormat, ...) 544 #define otLogDebgIp6(aInstance, aFormat, ...) 591 #if OPENTHREAD_CONFIG_LOG_MAC == 1 592 #define otLogCritMac(aInstance, aFormat, ...) otLogCrit(&aInstance, OT_LOG_REGION_MAC, aFormat, ## __VA_ARGS__) 593 #define otLogWarnMac(aInstance, aFormat, ...) otLogWarn(&aInstance, OT_LOG_REGION_MAC, aFormat, ## __VA_ARGS__) 594 #define otLogInfoMac(aInstance, aFormat, ...) otLogInfo(&aInstance, OT_LOG_REGION_MAC, aFormat, ## __VA_ARGS__) 595 #define otLogDebgMac(aInstance, aFormat, ...) otLogDebg(&aInstance, OT_LOG_REGION_MAC, aFormat, ## __VA_ARGS__) 596 #define otLogDebgMacErr(aInstance, aError, aFormat, ...) \ 597 otLogWarn(aInstance, OT_LOG_REGION_MAC, "Error %s: " aFormat, otThreadErrorToString(aError), ## __VA_ARGS__) 599 #define otLogCritMac(aInstance, aFormat, ...) 600 #define otLogWarnMac(aInstance, aFormat, ...) 601 #define otLogInfoMac(aInstance, aFormat, ...) 602 #define otLogDebgMac(aInstance, aFormat, ...) 603 #define otLogDebgMacErr(aInstance, aError, aFormat, ...) 651 #if OPENTHREAD_CONFIG_LOG_MEM == 1 652 #define otLogCritMem(aInstance, aFormat, ...) otLogCrit(&aInstance, OT_LOG_REGION_MEM, aFormat, ## __VA_ARGS__) 653 #define otLogWarnMem(aInstance, aFormat, ...) otLogWarn(&aInstance, OT_LOG_REGION_MEM, aFormat, ## __VA_ARGS__) 654 #define otLogInfoMem(aInstance, aFormat, ...) otLogInfo(&aInstance, OT_LOG_REGION_MEM, aFormat, ## __VA_ARGS__) 655 #define otLogDebgMem(aInstance, aFormat, ...) otLogDebg(&aInstance, OT_LOG_REGION_MEM, aFormat, ## __VA_ARGS__) 657 #define otLogCritMem(aInstance, aFormat, ...) 658 #define otLogWarnMem(aInstance, aFormat, ...) 659 #define otLogInfoMem(aInstance, aFormat, ...) 660 #define otLogDebgMem(aInstance, aFormat, ...) 706 #if OPENTHREAD_CONFIG_LOG_NETDIAG == 1 707 #define otLogCritNetDiag(aInstance, aFormat, ...) \ 708 otLogCrit(&aInstance, OT_LOG_REGION_NET_DIAG, aFormat, ## __VA_ARGS__) 709 #define otLogWarnNetDiag(aInstance, aFormat, ...) \ 710 otLogWarn(&aInstance, OT_LOG_REGION_NET_DIAG, aFormat, ## __VA_ARGS__) 711 #define otLogInfoNetDiag(aInstance, aFormat, ...) \ 712 otLogInfo(&aInstance, OT_LOG_REGION_NET_DIAG, aFormat, ## __VA_ARGS__) 713 #define otLogDebgNetDiag(aInstance, aFormat, ...) \ 714 otLogDebg(&aInstance, OT_LOG_REGION_NET_DIAG, aFormat, ## __VA_ARGS__) 716 #define otLogCritNetDiag(aInstance, aFormat, ...) 717 #define otLogWarnNetDiag(aInstance, aFormat, ...) 718 #define otLogInfoNetDiag(aInstance, aFormat, ...) 719 #define otLogDebgNetDiag(aInstance, aFormat, ...) 733 #if OPENTHREAD_ENABLE_CERT_LOG 734 #define otLogCertMeshCoP(aInstance, aFormat, ...) \ 735 _otLogFormatter(&aInstance, OT_LOG_LEVEL_NONE, OT_LOG_REGION_MESH_COP, aFormat, ## __VA_ARGS__) 737 #define otLogCertMeshCoP(aInstance, aFormat, ...) 783 #if OPENTHREAD_CONFIG_LOG_CLI == 1 784 #define otLogCritCli(aInstance, aFormat, ...) otLogCrit(&aInstance, OT_LOG_REGION_CLI, aFormat, ## __VA_ARGS__) 785 #define otLogWarnCli(aInstance, aFormat, ...) otLogWarn(&aInstance, OT_LOG_REGION_CLI, aFormat, ## __VA_ARGS__) 786 #define otLogInfoCli(aInstance, aFormat, ...) otLogInfo(&aInstance, OT_LOG_REGION_CLI, aFormat, ## __VA_ARGS__) 787 #define otLogInfoCliErr(aInstance, aError, aFormat, ...) \ 788 otLogInfo(&aInstance, OT_LOG_REGION_CLI, "Error %s: " aFormat, otThreadErrorToString(aError), ## __VA_ARGS__) 789 #define otLogDebgCli(aInstance, aFormat, ...) otLogDebg(&aInstance, OT_LOG_REGION_CLI, aFormat, ## __VA_ARGS__) 791 #define otLogCritCli(aInstance, aFormat, ...) 792 #define otLogWarnCli(aInstance, aFormat, ...) 793 #define otLogInfoCli(aInstance, aFormat, ...) 794 #define otLogInfoCliErr(aInstance, aError, aFormat, ...) 795 #define otLogDebgCli(aInstance, aFormat, ...) 841 #if OPENTHREAD_CONFIG_LOG_COAP == 1 842 #define otLogCritCoap(aInstance, aFormat, ...) otLogCrit(&aInstance, OT_LOG_REGION_COAP, aFormat, ## __VA_ARGS__) 843 #define otLogWarnCoap(aInstance, aFormat, ...) otLogWarn(&aInstance, OT_LOG_REGION_COAP, aFormat, ## __VA_ARGS__) 844 #define otLogInfoCoap(aInstance, aFormat, ...) otLogInfo(&aInstance, OT_LOG_REGION_COAP, aFormat, ## __VA_ARGS__) 845 #define otLogInfoCoapErr(aInstance, aError, aFormat, ...) \ 846 otLogInfo(&aInstance, OT_LOG_REGION_COAP, "Error %s: " aFormat, otThreadErrorToString(aError), ## __VA_ARGS__) 847 #define otLogDebgCoap(aInstance, aFormat, ...) otLogDebg(&aInstance, OT_LOG_REGION_COAP, aFormat, ## __VA_ARGS__) 849 #define otLogCritCoap(aInstance, aFormat, ...) 850 #define otLogWarnCoap(aInstance, aFormat, ...) 851 #define otLogInfoCoap(aInstance, aFormat, ...) 852 #define otLogInfoCoapErr(aInstance, aError, aFormat, ...) 853 #define otLogDebgCoap(aInstance, aFormat, ...) 899 #if OPENTHREAD_CONFIG_LOG_PLATFORM == 1 900 #define otLogCritPlat(aInstance, aFormat, ...) otLogCrit(aInstance, OT_LOG_REGION_PLATFORM, aFormat, ## __VA_ARGS__) 901 #define otLogWarnPlat(aInstance, aFormat, ...) otLogWarn(aInstance, OT_LOG_REGION_PLATFORM, aFormat, ## __VA_ARGS__) 902 #define otLogInfoPlat(aInstance, aFormat, ...) otLogInfo(aInstance, OT_LOG_REGION_PLATFORM, aFormat, ## __VA_ARGS__) 903 #define otLogDebgPlat(aInstance, aFormat, ...) otLogDebg(aInstance, OT_LOG_REGION_PLATFORM, aFormat, ## __VA_ARGS__) 905 #define otLogCritPlat(aInstance, aFormat, ...) 906 #define otLogWarnPlat(aInstance, aFormat, ...) 907 #define otLogInfoPlat(aInstance, aFormat, ...) 908 #define otLogDebgPlat(aInstance, aFormat, ...) 911 #endif // WINDOWS_LOGGING 925 #if OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_CRIT 926 #define otDumpCrit(aInstance, aRegion, aId, aBuf, aLength) \ 927 otDump(&aInstance, OT_LOG_LEVEL_CRIT, aRegion, aId, aBuf, aLength) 929 #define otDumpCrit(aInstance, aRegion, aId, aBuf, aLength) 944 #if OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_WARN 945 #define otDumpWarn(aInstance, aRegion, aId, aBuf, aLength) \ 946 otDump(&aInstance, OT_LOG_LEVEL_WARN, aRegion, aId, aBuf, aLength) 948 #define otDumpWarn(aInstance, aRegion, aId, aBuf, aLength) 963 #if OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_INFO 964 #define otDumpInfo(aInstance, aRegion, aId, aBuf, aLength) \ 965 otDump(&aInstance, OT_LOG_LEVEL_INFO, aRegion, aId, aBuf, aLength) 967 #define otDumpInfo(aInstance, aRegion, aId, aBuf, aLength) 982 #if OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_DEBG 983 #define otDumpDebg(aInstance, aRegion, aId, aBuf, aLength) \ 984 otDump(&aInstance, OT_LOG_LEVEL_DEBG, aRegion, aId, aBuf, aLength) 986 #define otDumpDebg(aInstance, aRegion, aId, aBuf, aLength) 1033 #if OPENTHREAD_CONFIG_LOG_NETDATA == 1 1034 #define otDumpCritNetData(aInstance, aId, aBuf, aLength) \ 1035 otDumpCrit(aInstance, OT_LOG_REGION_NET_DATA, aId, aBuf, aLength) 1036 #define otDumpWarnNetData(aInstance, aId, aBuf, aLength) \ 1037 otDumpWarn(aInstance, OT_LOG_REGION_NET_DATA, aId, aBuf, aLength) 1038 #define otDumpInfoNetData(aInstance, aId, aBuf, aLength) \ 1039 otDumpInfo(aInstance, OT_LOG_REGION_NET_DATA, aId, aBuf, aLength) 1040 #define otDumpDebgNetData(aInstance, aId, aBuf, aLength) \ 1041 otDumpDebg(aInstance, OT_LOG_REGION_NET_DATA, aId, aBuf, aLength) 1043 #define otDumpCritNetData(aInstance, aId, aBuf, aLength) 1044 #define otDumpWarnNetData(aInstance, aId, aBuf, aLength) 1045 #define otDumpInfoNetData(aInstance, aId, aBuf, aLength) 1046 #define otDumpDebgNetData(aInstance, aId, aBuf, aLength) 1096 #if OPENTHREAD_CONFIG_LOG_MLE == 1 1097 #define otDumpCritMle(aInstance, aId, aBuf, aLength) otDumpCrit(aInstance, OT_LOG_REGION_MLE, aId, aBuf, aLength) 1098 #define otDumpWarnMle(aInstance, aId, aBuf, aLength) otDumpWarn(aInstance, OT_LOG_REGION_MLE, aId, aBuf, aLength) 1099 #define otDumpInfoMle(aInstance, aId, aBuf, aLength) otDumpInfo(aInstance, OT_LOG_REGION_MLE, aId, aBuf, aLength) 1100 #define otDumpDebgMle(aInstance, aId, aBuf, aLength) otDumpDebg(aInstance, OT_LOG_REGION_MLE, aId, aBuf, aLength) 1102 #define otDumpCritMle(aInstance, aId, aBuf, aLength) 1103 #define otDumpWarnMle(aInstance, aId, aBuf, aLength) 1104 #define otDumpInfoMle(aInstance, aId, aBuf, aLength) 1105 #define otDumpDebgMle(aInstance, aId, aBuf, aLength) 1155 #if OPENTHREAD_CONFIG_LOG_ARP == 1 1156 #define otDumpCritArp(aInstance, aId, aBuf, aLength) otDumpCrit(aInstance, OT_LOG_REGION_ARP, aId, aBuf, aLength) 1157 #define otDumpWarnArp(aInstance, aId, aBuf, aLength) otDumpWarn(aInstance, OT_LOG_REGION_ARP, aId, aBuf, aLength) 1158 #define otDumpInfoArp(aInstance, aId, aBuf, aLength) otDumpInfo(aInstance, OT_LOG_REGION_ARP, aId, aBuf, aLength) 1159 #define otDumpDebgArp(aInstance, aId, aBuf, aLength) otDumpDebg(aInstance, OT_LOG_REGION_ARP, aId, aBuf, aLength) 1161 #define otDumpCritArp(aInstance, aId, aBuf, aLength) 1162 #define otDumpWarnArp(aInstance, aId, aBuf, aLength) 1163 #define otDumpInfoArp(aInstance, aId, aBuf, aLength) 1164 #define otDumpDebgArp(aInstance, aId, aBuf, aLength) 1214 #if OPENTHREAD_CONFIG_LOG_ICMP == 1 1215 #define otDumpCritIcmp(aInstance, aId, aBuf, aLength) \ 1216 otDumpCrit(aInstance, OT_LOG_REGION_ICMP, aId, aBuf, aLength) 1217 #define otDumpWarnIcmp(aInstance, aId, aBuf, aLength) \ 1218 otDumpWarn(aInstance, OT_LOG_REGION_ICMP, aId, aBuf, aLength) 1219 #define otDumpInfoIcmp(aInstance, aId, aBuf, aLength) \ 1220 otDumpInfo(aInstance, OT_LOG_REGION_ICMP, aId, aBuf, aLength) 1221 #define otDumpDebgIcmp(aInstance, aId, aBuf, aLength) \ 1222 otDumpDebg(aInstance, OT_LOG_REGION_ICMP, aId, aBuf, aLength) 1224 #define otDumpCritIcmp(aInstance, aId, aBuf, aLength) 1225 #define otDumpWarnIcmp(aInstance, aId, aBuf, aLength) 1226 #define otDumpInfoIcmp(aInstance, aId, aBuf, aLength) 1227 #define otDumpDebgIcmp(aInstance, aId, aBuf, aLength) 1277 #if OPENTHREAD_CONFIG_LOG_IP6 == 1 1278 #define otDumpCritIp6(aInstance, aId, aBuf, aLength) otDumpCrit(aInstance, OT_LOG_REGION_IP6, aId, aBuf, aLength) 1279 #define otDumpWarnIp6(aInstance, aId, aBuf, aLength) otDumpWarn(aInstance, OT_LOG_REGION_IP6, aId, aBuf, aLength) 1280 #define otDumpInfoIp6(aInstance, aId, aBuf, aLength) otDumpInfo(aInstance, OT_LOG_REGION_IP6, aId, aBuf, aLength) 1281 #define otDumpDebgIp6(aInstance, aId, aBuf, aLength) otDumpDebg(aInstance, OT_LOG_REGION_IP6, aId, aBuf, aLength) 1283 #define otDumpCritIp6(aInstance, aId, aBuf, aLength) 1284 #define otDumpWarnIp6(aInstance, aId, aBuf, aLength) 1285 #define otDumpInfoIp6(aInstance, aId, aBuf, aLength) 1286 #define otDumpDebgIp6(aInstance, aId, aBuf, aLength) 1336 #if OPENTHREAD_CONFIG_LOG_MAC == 1 1337 #define otDumpCritMac(aInstance, aId, aBuf, aLength) otDumpCrit(aInstance, OT_LOG_REGION_MAC, aId, aBuf, aLength) 1338 #define otDumpWarnMac(aInstance, aId, aBuf, aLength) otDumpWarn(aInstance, OT_LOG_REGION_MAC, aId, aBuf, aLength) 1339 #define otDumpInfoMac(aInstance, aId, aBuf, aLength) otDumpInfo(aInstance, OT_LOG_REGION_MAC, aId, aBuf, aLength) 1340 #define otDumpDebgMac(aInstance, aId, aBuf, aLength) otDumpDebg(aInstance, OT_LOG_REGION_MAC, aId, aBuf, aLength) 1342 #define otDumpCritMac(aInstance, aId, aBuf, aLength) 1343 #define otDumpWarnMac(aInstance, aId, aBuf, aLength) 1344 #define otDumpInfoMac(aInstance, aId, aBuf, aLength) 1345 #define otDumpDebgMac(aInstance, aId, aBuf, aLength) 1395 #if OPENTHREAD_CONFIG_LOG_MEM == 1 1396 #define otDumpCritMem(aInstance, aId, aBuf, aLength) otDumpCrit(aInstance, OT_LOG_REGION_MEM, aId, aBuf, aLength) 1397 #define otDumpWarnMem(aInstance, aId, aBuf, aLength) otDumpWarn(aInstance, OT_LOG_REGION_MEM, aId, aBuf, aLength) 1398 #define otDumpInfoMem(aInstance, aId, aBuf, aLength) otDumpInfo(aInstance, OT_LOG_REGION_MEM, aId, aBuf, aLength) 1399 #define otDumpDebgMem(aInstance, aId, aBuf, aLength) otDumpDebg(aInstance, OT_LOG_REGION_MEM, aId, aBuf, aLength) 1401 #define otDumpCritMem(aInstance, aId, aBuf, aLength) 1402 #define otDumpWarnMem(aInstance, aId, aBuf, aLength) 1403 #define otDumpInfoMem(aInstance, aId, aBuf, aLength) 1404 #define otDumpDebgMem(aInstance, aId, aBuf, aLength) 1418 #if OPENTHREAD_ENABLE_CERT_LOG 1419 #define otDumpCertMeshCoP(aInstance, aId, aBuf, aLength) \ 1420 otDump(&aInstance, OT_LOG_LEVEL_NONE, OT_LOG_REGION_MESH_COP, aId, aBuf, aLength) 1422 #define otDumpCertMeshCoP(aInstance, aId, aBuf, aLength) 1437 const size_t aLength);
1439 #if OPENTHREAD_CONFIG_LOG_PREPEND_LEVEL == 1 1448 const char *otLogLevelToString(
otLogLevel aLevel);
1451 #if OPENTHREAD_CONFIG_LOG_PREPEND_REGION == 1 1460 const char *otLogRegionToString(
otLogRegion aRegion);
1463 #if OPENTHREAD_CONFIG_LOG_PREPEND_LEVEL == 1 1465 #if OPENTHREAD_CONFIG_LOG_PREPEND_REGION == 1 1470 #define _otLogFormatter(aInstance, aLogLevel, aRegion, aFormat, ...) \ 1475 "[%s]%s: " aFormat OPENTHREAD_CONFIG_LOG_SUFFIX, \ 1476 otLogLevelToString(aLogLevel), \ 1477 otLogRegionToString(aRegion), \ 1481 #else // OPENTHREAD_CONFIG_LOG_PREPEND_REGION 1486 #define _otLogFormatter(aInstanc, aLogLevel, aRegion, aFormat, ...) \ 1491 "[%s]: " aFormat OPENTHREAD_CONFIG_LOG_SUFFIX, \ 1492 otLogLevelToString(aLogLevel), \ 1498 #else // OPENTHREAD_CONFIG_LOG_PREPEND_LEVEL 1500 #if OPENTHREAD_CONFIG_LOG_PREPEND_REGION == 1 1505 #define _otLogFormatter(aInstance, aLogLevel, aRegion, aFormat, ...) \ 1510 "%s: " aFormat OPENTHREAD_CONFIG_LOG_SUFFIX, \ 1511 otLogRegionToString(aRegion), \ 1515 #else // OPENTHREAD_CONFIG_LOG_PREPEND_REGION 1520 #define _otLogFormatter(aInstance, aLogLevel, aRegion, aFormat, ...) \ 1525 aFormat OPENTHREAD_CONFIG_LOG_SUFFIX, \ 1531 #endif // OPENTHREAD_CONFIG_LOG_PREPEND_REGION 1533 #if OPENTHREAD_CONFIG_ENABLE_DYNAMIC_LOG_LEVEL == 1 1538 #define _otDynamicLog(aInstance, aLogLevel, aRegion, aFormat, ...) \ 1540 if (otGetDynamicLogLevel(aInstance) >= aLogLevel) \ 1541 _otPlatLog(aLogLevel, aRegion, aFormat, ## __VA_ARGS__); \ 1544 #else // OPENTHREAD_CONFIG_ENABLE_DYNAMIC_LOG_LEVEL 1546 #define _otDynamicLog(aInstance, aLogLevel, aRegion, aFormat, ...) \ 1547 _otPlatLog(aLogLevel, aRegion, aFormat, ## __VA_ARGS__) 1549 #endif // OPENTHREAD_CONFIG_ENABLE_DYNAMIC_LOG_LEVEL 1555 #define _otPlatLog(aLogLevel, aRegion, aFormat, ...) \ 1556 OPENTHREAD_CONFIG_PLAT_LOG_FUNCTION(aLogLevel, aRegion, aFormat, ## __VA_ARGS__) 1562 #endif // LOGGING_HPP_ This type represents all the static / global variables used by OpenThread allocated in one place...
Definition: openthread-instance.h:59
This file defines the types and structures used in the OpenThread library API.
uint8_t otLogLevel
Log levels.
Definition: types.h:1182
This file is a wrapper for the standard "string.h" file Some platforms provide all required functions...
This file defines the WPP Tracing Definitions.
This file includes the platform abstraction for the debug log service.
This file defines the OpenThread Instance API.
otLogRegion
This enum represents log regions.
Definition: types.h:1188
void otDump(otInstance *aIntsance, otLogLevel aLevel, otLogRegion aRegion, const char *aId, const void *aBuf, const size_t aLength)
This method dumps bytes to the log in a human-readable fashion.
Definition: logging.cpp:165
This file includes compile-time configuration constants for OpenThread.