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:
committed by
Adrien Destugues
parent
e486e3c033
commit
b6b61bd39f
@@ -109,7 +109,7 @@ void dbg_printf_end();
|
|||||||
#define DEBUG_CONTEXT(x) \
|
#define DEBUG_CONTEXT(x) \
|
||||||
{ \
|
{ \
|
||||||
dbg_printf_begin(); \
|
dbg_printf_begin(); \
|
||||||
__out(DEBUG_APP " [%" B_PRIdBIGTIME ": %5" B_PRId32 "] ", \
|
__out(DEBUG_APP ": [%" B_PRIdBIGTIME ": %5" B_PRId32 "] ", \
|
||||||
system_time(), DEBUG_THREAD); \
|
system_time(), DEBUG_THREAD); \
|
||||||
x; \
|
x; \
|
||||||
dbg_printf_end(); \
|
dbg_printf_end(); \
|
||||||
@@ -117,7 +117,7 @@ void dbg_printf_end();
|
|||||||
#define DEBUG_CONTEXT_FUNCTION(prefix, x) \
|
#define DEBUG_CONTEXT_FUNCTION(prefix, x) \
|
||||||
{ \
|
{ \
|
||||||
dbg_printf_begin(); \
|
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__); \
|
system_time(), DEBUG_THREAD, __PRETTY_FUNCTION__); \
|
||||||
x; \
|
x; \
|
||||||
dbg_printf_end(); \
|
dbg_printf_end(); \
|
||||||
@@ -125,7 +125,7 @@ void dbg_printf_end();
|
|||||||
#define DEBUG_CONTEXT_LINE(x) \
|
#define DEBUG_CONTEXT_LINE(x) \
|
||||||
{ \
|
{ \
|
||||||
dbg_printf_begin(); \
|
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__); \
|
system_time(), DEBUG_THREAD, __PRETTY_FUNCTION__, __LINE__); \
|
||||||
x; \
|
x; \
|
||||||
dbg_printf_end(); \
|
dbg_printf_end(); \
|
||||||
|
|||||||
@@ -91,13 +91,13 @@ void dbg_printf_end();
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DEBUG_THREAD find_thread(NULL)
|
#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); \
|
B_PRIdBIGTIME ": %5" B_PRId32 "] ", system_time(), DEBUG_THREAD); \
|
||||||
x; dbg_printf_end(); }
|
x; dbg_printf_end(); }
|
||||||
#define DEBUG_CONTEXT_FUNCTION(prefix, x) { dbg_printf_begin(); \
|
#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(); }
|
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(), \
|
B_PRIdBIGTIME ": %5" B_PRId32 "] %s():%d: ", system_time(), \
|
||||||
DEBUG_THREAD, __FUNCTION__, __LINE__); x; dbg_printf_end(); }
|
DEBUG_THREAD, __FUNCTION__, __LINE__); x; dbg_printf_end(); }
|
||||||
|
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ void dbg_printf_end();
|
|||||||
#define DEBUG_CONTEXT(x) \
|
#define DEBUG_CONTEXT(x) \
|
||||||
{ \
|
{ \
|
||||||
dbg_printf_begin(); \
|
dbg_printf_begin(); \
|
||||||
__out(DEBUG_APP " [%" B_PRIdBIGTIME ": %5" B_PRId32 "] ", system_time(),\
|
__out(DEBUG_APP ": [%" B_PRIdBIGTIME ": %5" B_PRId32 "] ", system_time(),\
|
||||||
DEBUG_THREAD); \
|
DEBUG_THREAD); \
|
||||||
x; \
|
x; \
|
||||||
dbg_printf_end(); \
|
dbg_printf_end(); \
|
||||||
@@ -108,7 +108,7 @@ void dbg_printf_end();
|
|||||||
#define DEBUG_CONTEXT_FUNCTION(prefix, x) \
|
#define DEBUG_CONTEXT_FUNCTION(prefix, x) \
|
||||||
{ \
|
{ \
|
||||||
dbg_printf_begin(); \
|
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__); \
|
system_time(), DEBUG_THREAD, __PRETTY_FUNCTION__); \
|
||||||
x; \
|
x; \
|
||||||
dbg_printf_end(); \
|
dbg_printf_end(); \
|
||||||
@@ -116,7 +116,7 @@ void dbg_printf_end();
|
|||||||
#define DEBUG_CONTEXT_LINE(x) \
|
#define DEBUG_CONTEXT_LINE(x) \
|
||||||
{ \
|
{ \
|
||||||
dbg_printf_begin(); \
|
dbg_printf_begin(); \
|
||||||
__out(DEBUG_APP " [%" B_PRId64 ": %5" B_PRId32 "] %s:%d: ", \
|
__out(DEBUG_APP ": [%" B_PRId64 ": %5" B_PRId32 "] %s:%d: ", \
|
||||||
system_time(), DEBUG_THREAD, __PRETTY_FUNCTION__, __LINE__); \
|
system_time(), DEBUG_THREAD, __PRETTY_FUNCTION__, __LINE__); \
|
||||||
x; \
|
x; \
|
||||||
dbg_printf_end(); \
|
dbg_printf_end(); \
|
||||||
|
|||||||
@@ -100,14 +100,14 @@ void dbg_printf_end();
|
|||||||
#define DEBUG_CONTEXT(x) \
|
#define DEBUG_CONTEXT(x) \
|
||||||
{ \
|
{ \
|
||||||
dbg_printf_begin(); \
|
dbg_printf_begin(); \
|
||||||
__out(DEBUG_APP " [%" B_PRIdBIGTIME ": %5" B_PRId32 "] ", system_time(), DEBUG_THREAD); \
|
__out(DEBUG_APP ": [%" B_PRIdBIGTIME ": %5" B_PRId32 "] ", system_time(), DEBUG_THREAD); \
|
||||||
x; \
|
x; \
|
||||||
dbg_printf_end(); \
|
dbg_printf_end(); \
|
||||||
}
|
}
|
||||||
#define DEBUG_CONTEXT_FUNCTION(prefix, x) \
|
#define DEBUG_CONTEXT_FUNCTION(prefix, x) \
|
||||||
{ \
|
{ \
|
||||||
dbg_printf_begin(); \
|
dbg_printf_begin(); \
|
||||||
__out(DEBUG_APP " [%" B_PRIdBIGTIME ": %5" B_PRId32 "] %s" prefix, system_time(), DEBUG_THREAD, \
|
__out(DEBUG_APP ": [%" B_PRIdBIGTIME ": %5" B_PRId32 "] %s" prefix, system_time(), DEBUG_THREAD, \
|
||||||
__PRETTY_FUNCTION__); \
|
__PRETTY_FUNCTION__); \
|
||||||
x; \
|
x; \
|
||||||
dbg_printf_end(); \
|
dbg_printf_end(); \
|
||||||
@@ -115,7 +115,7 @@ void dbg_printf_end();
|
|||||||
#define DEBUG_CONTEXT_LINE(x) \
|
#define DEBUG_CONTEXT_LINE(x) \
|
||||||
{ \
|
{ \
|
||||||
dbg_printf_begin(); \
|
dbg_printf_begin(); \
|
||||||
__out(DEBUG_APP " [%" B_PRIdBIGTIME ": %5" B_PRId32 "] %s:%d: ", system_time(), DEBUG_THREAD, \
|
__out(DEBUG_APP ": [%" B_PRIdBIGTIME ": %5" B_PRId32 "] %s:%d: ", system_time(), DEBUG_THREAD, \
|
||||||
__PRETTY_FUNCTION__, __LINE__); \
|
__PRETTY_FUNCTION__, __LINE__); \
|
||||||
x; \
|
x; \
|
||||||
dbg_printf_end(); \
|
dbg_printf_end(); \
|
||||||
|
|||||||
@@ -98,9 +98,9 @@ void dbg_printf_end();
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DEBUG_THREAD find_thread(NULL)
|
#define DEBUG_THREAD find_thread(NULL)
|
||||||
#define DEBUG_CONTEXT(x) { dbg_printf_begin(); __out(DEBUG_APP " [%Ld: %5ld] ", system_time(), DEBUG_THREAD); x; dbg_printf_end(); }
|
#define DEBUG_CONTEXT(x) { dbg_printf_begin(); __out(DEBUG_APP ": [%Ld: %5ld] ", system_time(), DEBUG_THREAD); x; dbg_printf_end(); }
|
||||||
#define DEBUG_CONTEXT_FUNCTION(prefix, x) { dbg_printf_begin(); __out(DEBUG_APP " [%Ld: %5ld] %s()" prefix, system_time(), DEBUG_THREAD, __FUNCTION__); x; dbg_printf_end(); }
|
#define DEBUG_CONTEXT_FUNCTION(prefix, x) { dbg_printf_begin(); __out(DEBUG_APP ": [%Ld: %5ld] %s()" prefix, system_time(), DEBUG_THREAD, __FUNCTION__); x; dbg_printf_end(); }
|
||||||
#define DEBUG_CONTEXT_LINE(x) { dbg_printf_begin(); __out(DEBUG_APP " [%Ld: %5ld] %s():%d: ", system_time(), DEBUG_THREAD, __FUNCTION__, __LINE__); x; dbg_printf_end(); }
|
#define DEBUG_CONTEXT_LINE(x) { dbg_printf_begin(); __out(DEBUG_APP ": [%Ld: %5ld] %s():%d: ", system_time(), DEBUG_THREAD, __FUNCTION__, __LINE__); x; dbg_printf_end(); }
|
||||||
|
|
||||||
#define TPRINT(x) DEBUG_CONTEXT( __out x )
|
#define TPRINT(x) DEBUG_CONTEXT( __out x )
|
||||||
#define TREPORT_ERROR(status) DEBUG_CONTEXT_LINE( __out("%s\n", strerror(status)) )
|
#define TREPORT_ERROR(status) DEBUG_CONTEXT_LINE( __out("%s\n", strerror(status)) )
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ void dbg_printf_end();
|
|||||||
#define DEBUG_CONTEXT(x) \
|
#define DEBUG_CONTEXT(x) \
|
||||||
{ \
|
{ \
|
||||||
dbg_printf_begin(); \
|
dbg_printf_begin(); \
|
||||||
__out(DEBUG_APP " [%" B_PRIdBIGTIME ": %5" B_PRId32 "] ", \
|
__out(DEBUG_APP ": [%" B_PRIdBIGTIME ": %5" B_PRId32 "] ", \
|
||||||
system_time(), DEBUG_THREAD); \
|
system_time(), DEBUG_THREAD); \
|
||||||
x; \
|
x; \
|
||||||
dbg_printf_end(); \
|
dbg_printf_end(); \
|
||||||
@@ -112,7 +112,7 @@ void dbg_printf_end();
|
|||||||
#define DEBUG_CONTEXT_FUNCTION(prefix, x) \
|
#define DEBUG_CONTEXT_FUNCTION(prefix, x) \
|
||||||
{ \
|
{ \
|
||||||
dbg_printf_begin(); \
|
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__); \
|
system_time(), DEBUG_THREAD,__PRETTY_FUNCTION__); \
|
||||||
x; \
|
x; \
|
||||||
dbg_printf_end(); \
|
dbg_printf_end(); \
|
||||||
@@ -120,7 +120,7 @@ void dbg_printf_end();
|
|||||||
#define DEBUG_CONTEXT_LINE(x) \
|
#define DEBUG_CONTEXT_LINE(x) \
|
||||||
{ \
|
{ \
|
||||||
dbg_printf_begin(); \
|
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__); \
|
system_time(), DEBUG_THREAD, __PRETTY_FUNCTION__, __LINE__); \
|
||||||
x; \
|
x; \
|
||||||
dbg_printf_end(); \
|
dbg_printf_end(); \
|
||||||
|
|||||||
Reference in New Issue
Block a user