10xjava-dev / 10xjava-dev.github.io

http://10xjava.dev/
5 stars 0 forks source link

How to write diagnostic code that doesn't fail #12

Open spoole167 opened 6 months ago

spoole167 commented 6 months ago

We've all written that extra tracing code, code that is intended to be used when things go wrong. when we turn on tracing etc. We've all (probably) also hit the snag where the tracing code failed - because we didnt test it or because we forgot about the fact that during an error situation - all bets are off.

How do we do this better - how so we add diagnostic code (in all the various places that its need) that is robust , useful and hopefully performant?