Logging related Macrofunction » History » Version 1
jun chen, 03/10/2025 12:05 AM
1 | 1 | jun chen | # Logging related Macrofunction |
---|---|---|---|
2 | |||
3 | ## cfatal: |
||
4 | Macro, print message immediately and abort |
||
5 | |||
6 | ## DBG(lvl, xxx) |
||
7 | Macro, only exist in debug/optimized code, can not be used under xxx/export, prin t debug message only if lvl < 5, |
||
8 | in the code the lvl always a macro, could control this behavior with python interface set—debug—level(lvl, filename or module name) |
||
9 | |||
10 | ## DBG—SCOPF(): |
||
11 | Macro, similar with DBG, working as DBG—SCOPF(lvl) {} which could enable/disable d ebug for a block. |
||
12 | |||
13 | ## DFFINF—DBG—VR: |
||
14 | Macro, define a debug only variable (this variable was only be used in DBG/DBG—SC OPF), defined this macro to avoid compiling error in release build(unusing variable warning) |
||
15 | |||
16 | ## ASSFRTS: |
||
17 | Macro, similar with built-in assert but could output more meaningful message. |
||
18 | |||
19 | ## Assert: |
||
20 | function, which required distribute message system, will report the message to the sched uler |
||
21 | |||
22 | ## FNS..RFS: |
||
23 | Macro, similar with ASSFRTS but not cause crash, designed for some unexpected value which many caused unexpected results |
||
24 | |||
25 | ## app—error/app—print, |
||
26 | function, will print APP.800/APP.400 to both screen and file, this is designed to show some info/error to user |
||
27 | |||
28 | ## pprint, |
||
29 | function, always print message to file without control |