Debug Levels when writing an application

前端 未结 8 1272
别那么骄傲
别那么骄傲 2020-12-23 12:11

I would like to know if you guys have any suggestions about debug levels when writing an application.

I thought about 4 levels:

0 : No Debug
1 : All inpu

相关标签:
8条回答
  • 2020-12-23 13:06

    Whatever you choose, there will be something you wanted to see which is just into the next level...

    I don't think there is a general answer to this question, because it's so dependent on what the application is doing. Much like the oily pages in the Haynes manual (UK readers will know what I mean), I tend to find that you end up with heavy logging in the areas which have traditionally been troublesome, and almost none in the area which is going to cause you trouble next.

    0 讨论(0)
  • 2020-12-23 13:07

    I have:

    • Critical/Fatal, the program can't possible continue, normally the user lost it.
    • Error, someting really wrong, used data can be corrupt, but you can be lucky.
    • Warning, this is not right, I can continue, but please have a look.
    • Hint/Information, i like to say something, but I don't expect you to listen.
    • Debug, all information only interesting for programmers.

    Normaly the lowest two levels are blocked. But the others are shown. And if you want to block the Fatal level, its fine with me, but don't expect that I clean up the mess afterwards (unfortunately I still have to...).

    0 讨论(0)
提交回复
热议问题