BoostryJP / ibet-Wallet-API

A powerful API suite for seamlessly building ibet blockchain wallet systems 🛠
https://ibet.jp/ibet-for-fin
Apache License 2.0
9 stars 0 forks source link

Add "NOTICE" logging level #1567

Closed YoshihitoAso closed 2 weeks ago

YoshihitoAso commented 2 weeks ago

In Python's logging module, you can specify five levels of logging:

In the ibet-Wallet-API logs, we primarily use three of these levels: ERROR, WARNING, and INFO, with the following distinctions:

Regarding the WARNING level, in typical use of the ibet-Wallet-API, immediate detection is not currently in place. However, as service operators, there are situations where immediate detection and attention are desired. Therefore, we would like to restructure the log levels as follows:

Based on this idea, I made a modification to add a new log level "NOTICE". Also, I reviewed the log levels of WARNING and NOTICE.

github-actions[bot] commented 2 weeks ago

Coverage

Coverage Report •
FileStmtsMissCoverMissing
logger.py80100% 
app
   log.py24483%37–38, 41–42
app/api/routers
   company_info.py95594%158–159, 294, 314, 332
   eth.py2443784%192–194, 208–211, 213, 267–268, 270–273, 306–307, 310–311, 398–400, 414–417, 419, 473–474, 543–547, 549–552
   position.py4004090%440, 447, 494–495, 518–523, 581–582, 609–610, 641–646, 686–687, 714–715, 746–751, 976–977, 1004–1005, 1046–1051
   token.py409698%123–124, 590, 723, 737, 741
   token_bond.py141795%334–339, 342
   token_coupon.py141795%316–321, 324
   token_membership.py141795%318–323, 326
   token_share.py141795%332–337, 340
app/model/blockchain
   token.py4882594%91, 105–106, 110–112, 140, 143, 245–246, 359–360, 382, 431–432, 439–440, 589–590, 687–688, 806–807, 885–886
app/utils
   web3_utils.py1514172%54, 64–65, 69–70, 92, 107–108, 138–140, 142–143, 145, 152–161, 165, 168–172, 181, 198–199, 222, 226, 229–233, 242
batch
   indexer_Block_Tx_Data.py1061783%137, 150–151, 153–161, 163, 167–170
   indexer_CompanyList.py952177%110–112, 142–145, 147–154, 156–157, 161–164
   indexer_Consume_Coupon.py1371688%72–73, 78–80, 176, 228–229, 238–241, 247–250
   indexer_DEX.py2563287%88–89, 94–96, 163, 216–217, 231, 236–237, 251, 283–284, 312–313, 334–335, 390, 393–394, 397, 516–517, 526–529, 535–538
   indexer_Position_Bond.py76310586%89–92, 412–413, 431–432, 496–497, 515–516, 553–554, 591–592, 629–630, 667–668, 705–706, 718, 732–733, 757–758, 765, 782–783, 790, 807–808, 832–833, 835–836, 839–841, 851, 867–868, 926–927, 939, 953–954, 961, 976–977, 979–980, 983–985, 999–1000, 1007, 1060–1061, 1073, 1087–1088, 1095, 1110–1111, 1113–1114, 1117–1119, 1133–1134, 1141, 1156–1157, 1164, 1217–1218, 1327–1328, 1357–1358, 1411–1412, 1485–1486, 1635, 1640–1641, 1653–1654, 1669–1670, 1682–1683, 1692–1695, 1701–1704
   indexer_Position_Coupon.py4749081%77–80, 337–343, 346–349, 352, 356–358, 364–365, 377, 391–392, 416–417, 424, 441–442, 449, 466–467, 491–492, 494–495, 498–500, 510, 526–527, 585–586, 598, 610–611, 618, 633–634, 636–637, 640–642, 656–657, 664, 721–722, 820–821, 832, 838, 874–875, 907, 966, 971–972, 975, 978–979, 981–985, 1000–1001, 1013–1014, 1023–1026, 1032–1035
   indexer_Position_Membership.py4567383%77–80, 340, 354–355, 379–380, 387, 404–405, 412, 429–430, 454–455, 457–458, 461–463, 473, 489–490, 548–549, 561, 573–574, 581, 596–597, 599–600, 603–605, 619–620, 627, 684–685, 784–785, 796, 802, 838–839, 871, 930, 935–936, 939, 942–943, 945–949, 964–965, 977–978, 987–990, 996–999
   indexer_Position_Share.py76310386%91–92, 412–413, 431–432, 496–497, 515–516, 553–554, 591–592, 629–630, 667–668, 705–706, 718, 732–733, 757–758, 765, 782–783, 790, 807–808, 832–833, 835–836, 839–841, 851, 867–868, 926–927, 939, 953–954, 961, 976–977, 979–980, 983–985, 999–1000, 1007, 1060–1061, 1073, 1087–1088, 1095, 1110–1111, 1113–1114, 1117–1119, 1133–1134, 1141, 1156–1157, 1164, 1217–1218, 1327–1328, 1357–1358, 1411–1412, 1485–1486, 1635, 1640–1641, 1653–1654, 1669–1670, 1682–1683, 1692–1695, 1701–1704
   indexer_Token_Detail.py941089%134, 149–152, 157, 162–165
   indexer_Token_Detail_ShortTerm.py911089%147, 162–165, 172, 177–180
   indexer_Token_Holders.py2703188%395–396, 427–428, 445–446, 453–454, 482–483, 515–516, 541–543, 553–563, 565, 569–572
   indexer_Token_List.py1091487%142–143, 170–172, 223, 226–229, 235–238
   indexer_Transfer.py2243982%94, 109, 177–178, 232–236, 350, 423, 440–441, 459–460, 463–471, 474–484, 488–491
   indexer_TransferApproval.py3957880%92–95, 103–106, 140–144, 230–232, 234–241, 243–244, 247–250, 252–255, 266–269, 333, 382–383, 419–420, 433, 439–440, 453, 468–469, 482, 488–489, 509–510, 523, 531–532, 552–553, 566, 572–573, 594–595, 709–710, 726–727, 744–745, 754–757, 763–766
   log.py140100% 
   processor_Block_Sync_Status.py1431986%60, 199, 201, 212, 214, 241–244, 246–252, 254–255, 259
   processor_Notifications_Coupon_Exchange.py2943388%96, 116–117, 122, 133, 150, 152, 178, 219, 259, 302, 342, 382, 422, 465, 505, 548, 574, 586, 588–589, 591–592, 595–597, 599–600, 602, 606–609
   processor_Notifications_Membership_Exchange.py2943388%96, 116–117, 122, 133, 150, 152, 178, 219, 262, 305, 345, 385, 428, 471, 514, 557, 583, 595, 597–598, 600–601, 604–606, 608–609, 611, 615–618
   processor_Notifications_Token.py2003085%121, 145–146, 151, 173, 175, 200–203, 227, 325, 370, 415, 438, 445, 447–448, 450–451, 454–456, 458–459, 461, 465–468
   processor_Send_Mail.py561376%99–108, 110–111, 115
tests/app
   eth_SendRawTransactionNowait_test.py2870100% 
   eth_SendRawTransaction_test.py4650100% 
tests/batch
   indexer_Consume_Coupon_test.py2510100% 
   indexer_DEX_test.py5450100% 
   indexer_Position_Bond_test.py7860100% 
   indexer_Position_Coupon_test.py4770100% 
   indexer_Position_Membership_test.py4490100% 
   indexer_Position_Share_test.py7840100% 
   indexer_Token_Detail_ShortTerm_test.py3080100% 
   indexer_Token_Detail_test.py1980100% 
   indexer_Token_List_test.py3110100% 
   indexer_TransferApproval_test.py4560100% 
   processor_Send_Mail_test.py1190100% 
TOTAL41611140796% 

Tests Skipped Failures Errors Time
1399 0 :zzz: 0 :x: 0 :fire: 21m 14s :stopwatch: