This is an automated email from Gerrit.

"zapb <d...@zapb.de>" just uploaded a new patch set to Gerrit, which you can 
find at https://review.openocd.org/c/openocd/+/8576

-- gerrit

commit 4d302d33c407455428302831f9ddeb221447430a
Author: Marc Schink <d...@zapb.de>
Date:   Wed Oct 23 15:42:16 2024 +0200

    doc/manual: Add section about logging
    
    The log messages are very inconsistent across the code base. Add a
    guideline for log messages to help improve consistency. The guideline is
    based on the most commonly used style in the current code base.
    
    Change-Id: I076d68abe588dd04b59580379e97b82d537def23
    Signed-off-by: Marc Schink <d...@zapb.de>

diff --git a/doc/manual/style.txt b/doc/manual/style.txt
index a1e6b8f016..d72f4f58d2 100644
--- a/doc/manual/style.txt
+++ b/doc/manual/style.txt
@@ -225,6 +225,13 @@ if (!buf) {
 }
 @endcode
 
+@section stylelogging Logging
+
+ - Use one of the `LOG_xxx()` functions for logging, never use `printf()` or 
similar functions
+ - If the log message is related to a target, use the corresponding 
`LOG_TARGET_xxx()` functions
+ - If an operation failed, use `LOG_ERROR()` or `LOG_TARGET_ERROR()` to 
provide information
+ - Do not use a period or exclamation mark at the end of a message
+
  */
 /** @page styledoxygen Doxygen Style Guide
 

-- 

Reply via email to