From 2d2fbe6c7d70e0f5ee00ca72a1ca5b6f72011fe6 Mon Sep 17 00:00:00 2001 From: Lefteris Karapetsas Date: Wed, 12 Aug 2015 09:07:00 +0200 Subject: [PATCH] Add info about logging in the coding standards --- CodingStandards.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CodingStandards.txt b/CodingStandards.txt index a065928d3..76f9920e7 100644 --- a/CodingStandards.txt +++ b/CodingStandards.txt @@ -226,3 +226,15 @@ a. Includes should go in order of lower level (STL -> boost -> libdevcore -> lib #include b. The only exception to the above rule is the top of a .cpp file where its corresponding header should be located. + +13. Logging + +Logging should be performed at appropriate verbosities depending on the logging message. +The more likely a message is to repeat (and thus cuase noise) the higher in verbosity it should be. +Some rules to keep in mind: + + - Verbosity == 0 -> Reserved for important stuff that users must see and can understand. + - Verbosity == 1 -> Reserved for stuff that users don't need to see but can understand. + - Verbosity >= 2 -> Anything that is or might be displayed more than once every minute + - Verbosity >= 3 -> Anything that only a developer would understand + - Verbosity >= 4 -> Anything that is low-level (e.g. peer disconnects, timers being cancelled)