general/logs: Ensure all logs start with THING:

* 90% of our logs start with some context on what is
  generating a log message (thing:)
* Things following this logging model however do "thing [time"
  which is inconsistent
* Being consistent will allow us to start scanning logs in a
  smart way and try to analyze patterns of what is throwing
  errors, etc in an automatic way.
  aka /^(service/driver/etc)\:/

Change-Id: I1ef2df4f17f70f858a485554a4e8a3f87f1a69c8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5568
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Oscar Lesta <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
Alexander von Gluck IV
2022-09-08 17:59:21 +00:00
committed by Adrien Destugues
parent e486e3c033
commit b6b61bd39f
6 changed files with 18 additions and 18 deletions
+3 -3
View File
@@ -109,7 +109,7 @@ void dbg_printf_end();
#define DEBUG_CONTEXT(x) \
{ \
dbg_printf_begin(); \
__out(DEBUG_APP " [%" B_PRIdBIGTIME ": %5" B_PRId32 "] ", \
__out(DEBUG_APP ": [%" B_PRIdBIGTIME ": %5" B_PRId32 "] ", \
system_time(), DEBUG_THREAD); \
x; \
dbg_printf_end(); \
@@ -117,7 +117,7 @@ void dbg_printf_end();
#define DEBUG_CONTEXT_FUNCTION(prefix, x) \
{ \
dbg_printf_begin(); \
__out(DEBUG_APP " [%" B_PRIdBIGTIME ": %5" B_PRId32 "] %s" prefix, \
__out(DEBUG_APP ": [%" B_PRIdBIGTIME ": %5" B_PRId32 "] %s" prefix, \
system_time(), DEBUG_THREAD, __PRETTY_FUNCTION__); \
x; \
dbg_printf_end(); \
@@ -125,7 +125,7 @@ void dbg_printf_end();
#define DEBUG_CONTEXT_LINE(x) \
{ \
dbg_printf_begin(); \
__out(DEBUG_APP " [%" B_PRIdBIGTIME ": %5" B_PRId32 "] %s:%d: ", \
__out(DEBUG_APP ": [%" B_PRIdBIGTIME ": %5" B_PRId32 "] %s:%d: ", \
system_time(), DEBUG_THREAD, __PRETTY_FUNCTION__, __LINE__); \
x; \
dbg_printf_end(); \
+3 -3
View File
@@ -91,13 +91,13 @@ void dbg_printf_end();
#endif
#define DEBUG_THREAD find_thread(NULL)
#define DEBUG_CONTEXT(x) { dbg_printf_begin(); __out(DEBUG_APP " [%" \
#define DEBUG_CONTEXT(x) { dbg_printf_begin(); __out(DEBUG_APP ": [%" \
B_PRIdBIGTIME ": %5" B_PRId32 "] ", system_time(), DEBUG_THREAD); \
x; dbg_printf_end(); }
#define DEBUG_CONTEXT_FUNCTION(prefix, x) { dbg_printf_begin(); \
__out(DEBUG_APP " [%" B_PRIdBIGTIME ": %5" B_PRId32 "] %s()" prefix, \
__out(DEBUG_APP ": [%" B_PRIdBIGTIME ": %5" B_PRId32 "] %s()" prefix, \
system_time(), DEBUG_THREAD, __FUNCTION__); x; dbg_printf_end(); }
#define DEBUG_CONTEXT_LINE(x) { dbg_printf_begin(); __out(DEBUG_APP " [%" \
#define DEBUG_CONTEXT_LINE(x) { dbg_printf_begin(); __out(DEBUG_APP ": [%" \
B_PRIdBIGTIME ": %5" B_PRId32 "] %s():%d: ", system_time(), \
DEBUG_THREAD, __FUNCTION__, __LINE__); x; dbg_printf_end(); }