Code Review
/
src
/
drm-lease-manager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
16e01d7
)
log: Add line number to debug log output
68/27268/2
author
Damian Hobson-Garcia
<dhobsong@igel.co.jp>
Thu, 16 Sep 2021 09:07:54 +0000
(18:07 +0900)
committer
Damian Hobson-Garcia
<dhobsong@igel.co.jp>
Fri, 25 Mar 2022 07:33:08 +0000
(16:33 +0900)
Some debug logging, such as memory allocation failure, uses similar
log messageing in several places. Add the file line number to
the debug log to help differentiate where notable errors occured.
Bug-AGL: SPEC-3815
Change-Id: I2151e21533716ea0badbb6303b713e644b544e6d
Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
common/log.h
patch
|
blob
|
history
diff --git
a/common/log.h
b/common/log.h
index
cd0c0e3
..
ed3b2db
100644
(file)
--- a/
common/log.h
+++ b/
common/log.h
@@
-19,8
+19,9
@@
#include <stdbool.h>
#include <stdio.h>
-#define DEBUG_LOG(FMT, ...) \
- dlm_log_print(true, stdout, "DEBUG: %s: " FMT, __func__, ##__VA_ARGS__)
+#define DEBUG_LOG(FMT, ...) \
+ dlm_log_print(true, stdout, "DEBUG: %s: line %d: " FMT, __func__, \
+ __LINE__, ##__VA_ARGS__)
#define INFO_LOG(FMT, ...) \
dlm_log_print(false, stdout, "INFO: " FMT, ##__VA_ARGS__)
#define WARN_LOG(FMT, ...) \