top of page

Three tips on logging your code

Logging is like brushing your teeth every morning. The more you do it, the less hassle it seems. When your program crashes, logging gives you the insight to track and debug your code.

So, here are three best tips we find useful while logging:

๐‘ถ๐’๐’๐’š ๐’๐’๐’ˆ ๐’๐’†๐’„๐’†๐’”๐’”๐’‚๐’“๐’š ๐’‚๐’๐’… ๐’•๐’†๐’„๐’‰๐’๐’Š๐’„๐’‚๐’ ๐’”๐’๐’–๐’“๐’„๐’† ๐’„๐’๐’…๐’† - we often find programmers overlogging causing significant time loss to filter when an error occurs.

๐‘บ๐’•๐’๐’“๐’† ๐’•๐’‰๐’† ๐’๐’๐’ˆ ๐’Š๐’ ๐’‚ ๐’”๐’Š๐’๐’ˆ๐’๐’† ๐’๐’๐’„๐’‚๐’•๐’Š๐’๐’ - when working on a project in a team, it is best to make the log visible to everyone involved for better efficiency and avoid miscommunication.

๐‘ท๐’“๐’๐’‘๐’†๐’“ ๐’Š๐’๐’…๐’†๐’™๐’Š๐’๐’ˆ - Categorize and document with a universal language. It makes it easier to recheck the code over time.

There you go.

๐š‚๐š๐šŠ๐š›๐š ๐š•๐š˜๐š๐š๐š’๐š—๐š ๐šŠ๐š—๐š ๐šœ๐š‘๐šŠ๐š›๐šŽ ๐šข๐š˜๐šž๐š› ๐š๐š’๐š™๐šœ ๐š‹๐šŽ๐š•๐š˜๐š .


bottom of page