aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/include/odp/api/plat
diff options
context:
space:
mode:
authorMatias Elo <matias.elo@nokia.com>2023-06-20 11:21:51 +0300
committerMatias Elo <matias.elo@nokia.com>2023-07-07 17:51:30 +0300
commitfcb53096f0b1f7def9832796c1d968f8f503eb7a (patch)
treee685d84ea5d0496710b947434c904d664b5ba3fd /platform/linux-generic/include/odp/api/plat
parent0cad9dda5aa4c565c14aec0d0bf13da3401da7e1 (diff)
linux-gen: debug: add message types to logs
Include the type of message when writing implementation internal logs. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'platform/linux-generic/include/odp/api/plat')
-rw-r--r--platform/linux-generic/include/odp/api/plat/debug_inlines.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/platform/linux-generic/include/odp/api/plat/debug_inlines.h b/platform/linux-generic/include/odp/api/plat/debug_inlines.h
index e11dba97b..0755b1fda 100644
--- a/platform/linux-generic/include/odp/api/plat/debug_inlines.h
+++ b/platform/linux-generic/include/odp/api/plat/debug_inlines.h
@@ -50,9 +50,9 @@ extern odp_abort_func_t _odp_abort_fn;
/**
* ODP LOG macro.
*/
-#define _ODP_LOG(level, fmt, ...) \
- _ODP_LOG_FN(level, "%s:%d:%s(): " fmt, __FILE__, \
- __LINE__, __func__, ##__VA_ARGS__)
+#define _ODP_LOG(level, prefix, fmt, ...) \
+ _ODP_LOG_FN(level, "%s: %s:%d:%s(): " fmt, prefix, \
+ __FILE__, __LINE__, __func__, ##__VA_ARGS__)
/**
* Runtime assertion-macro - aborts if 'cond' is false.
@@ -70,7 +70,7 @@ extern odp_abort_func_t _odp_abort_fn;
do { \
if (ODP_DEBUG_PRINT == 1) \
__extension__ ({ \
- _ODP_LOG(ODP_LOG_DBG, ##__VA_ARGS__); \
+ _ODP_LOG(ODP_LOG_DBG, "DBG", ##__VA_ARGS__); \
}); \
} while (0)
@@ -80,7 +80,7 @@ extern odp_abort_func_t _odp_abort_fn;
#define _ODP_WARN(...) \
do { \
__extension__ ({ \
- _ODP_LOG(ODP_LOG_WARN, ##__VA_ARGS__); \
+ _ODP_LOG(ODP_LOG_WARN, "WARN", ##__VA_ARGS__); \
}); \
} while (0)
@@ -90,7 +90,7 @@ extern odp_abort_func_t _odp_abort_fn;
#define _ODP_ERR(...) \
do { \
__extension__ ({ \
- _ODP_LOG(ODP_LOG_ERR, ##__VA_ARGS__); \
+ _ODP_LOG(ODP_LOG_ERR, "ERR", ##__VA_ARGS__); \
}); \
} while (0)
@@ -101,7 +101,7 @@ extern odp_abort_func_t _odp_abort_fn;
#define _ODP_ABORT(...) \
do { \
__extension__ ({ \
- _ODP_LOG(ODP_LOG_ABORT, ##__VA_ARGS__); \
+ _ODP_LOG(ODP_LOG_ABORT, "ABORT", ##__VA_ARGS__); \
}); \
_odp_abort_fn(); \
} while (0)