From 9e9b41765d599dafce89ae204ac37a1481a8226d Mon Sep 17 00:00:00 2001 From: Lovesh Jain Date: Tue, 27 Oct 2020 18:20:31 +1300 Subject: [PATCH] adding more details about writing good logs --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index b98646b..398c0be 100644 --- a/README.md +++ b/README.md @@ -121,6 +121,16 @@ A good example of a log event taken from [timber.io](https://github.com/timberio ``` `Note that this JSON content should all be contained on a single line. It is only pretty printed here for readability.` +Debug logs typically report application events that are useful when diagnosing a problem. Investigations into application failures need the "W" words: + + Who, What, When, Where and Why: + +* Who was using the system when it failed? +* Where in the code did the application fail? +* What was the system doing when it failed? +* When did the failure occur? +* Why did the application fail? + There are many good guides on good logging practices but if you start with the principles above you will go far. If your logs don't follow these basic principles then talk to your product owner or engineering lead to start to