Logging Best Practices: Kill the bug, not the rainforest | debug agent

Ғылым және технология

Logging is precognitive debugging. It's like writing a book as a team, we need a common set of best practices to keep that book readable. We also need to avoid overlogging which can kill...
We need to adopt common guidelines within each company that detail how logs should be written. What constitutes good logging and what’s bad. Pretty much every company I ever worked for had a coding guideline discussing indention and formatting. Almost no company had a standard for logging. I’d argue that logging is far more important and has more impact on the quality of your code than indentation or formatting.
We need a document we can refer to in code reviews so the team works coherently to produce a unified code base that’s easy to debug and isn’t wasteful. Watch this video for a baseline on how to do this.
For more check out www.debugagent.com/
Title: Logging Best Practices
You can learn all about every feature mentioned in this video in this playlist: • Practical Debugging at...
Here are the features mentioned in the videos and direct links to the applicable videos (including positions within the video) for every feature:
✅ Return Immediately - • Practical Debugging at...
✅ Jump to Line - • Practical Debugging at...
✅ Inline Watch - • Practical Debugging at...
✅ Object Marking - • Practical Debugging at...
✅ Field Watchpoints - • Practical Debugging at...
✅ Method Breakpoints - • Practical Debugging at...
✅ Grouping/Naming - • Practical Debugging at...
✅ Instance/Class/Caller filters - • Practical Debugging at...
✅ Array/Collection Filtering - • Practical Debugging at...
✅ Stream Debugger - • Practical Debugging at...
✅ Entry Rendering and Rendering Annotations - • Practical Debugging at...
✅ Thread View - • Practical Debugging at...
✅ Asynchronous Stack Traces - • Practical Debugging at...
✅ Searchable Memory View - • Practical Debugging at...
✅ Track New Instances - • Practical Debugging at...
--------------
👉 Twitter: / debugagent
👉 LinkedIn: / shai-almo. .
👉 Website: debugagent.com/
👉 GitHub: github.com/shai-almog
👉 Mastodon: mastodon.social/@debugagent
---------------
logging,log4j,log4j tutorial,best practices,logging best practices,logging best practices java,logging best practices spring boot,kubernetes logging best practices,logging best practices c#,java logging,java logger tutorial,java logging tutorial,java logging best practices,over logging,programming tips,logging tutorial java,coding best practices,production debugging,observability,debugging in prodction,slf4j,debug agent,kill the bug,rainforest
00:00 Introduction
00:26 I Love Logs
01:02 Logs are a Team Effort
01:30 Bad Logging is Murder
02:16 Bad Logging increases Costs
02:39 Bad Logging impacts readability
03:03 Bad Logging Hurts the environment
03:26 Insufficient logging is also bad
03:45 The CI/CD Cycle of Death
04:19 The Best Practices Document
05:12 Suggestions, Not Rules
05:52 Don't Rollout Your Own Logger
06:30 Keep Log Messages Short
06:41 Keep Log Messages Unique
06:58 Don't Log in a Loop, Don't Log Collections
07:42 Don't Invoke Code/Methods
08:52 Don't Log Variables that are already there
09:12 Log on Method Exit not on Enter
09:48 Read the Log File, Put it in your calendar
10:39 Define Logging Levels, Use Warning for Production/Staging
12:12 Don't Double Log
12:35 Sanitize User Data
13:00 Use PII Reduction
13:19 Use Mapped Diagnostic Context (MDC)
15:02 Asynchronous Logging
15:14 Final Word

Пікірлер: 2

  • @jaitramadandijeke6440
    @jaitramadandijeke6440Ай бұрын

    Beautiful, thanks for sharing!

  • @user-oq8zo9sj8f
    @user-oq8zo9sj8f Жыл бұрын

    very useful, thanks!

Келесі