X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?p=o-du%2Fphy.git;a=blobdiff_plain;f=fhi_lib%2Flib%2Fsrc%2Fxran_printf.h;fp=fhi_lib%2Flib%2Fsrc%2Fxran_printf.h;h=e2c938b067454ee7e8a8b49e1b19cb5258013e9e;hp=8649b017fef0f8045779a3c897f02d46c20a0143;hb=2de97529a4c5a1922214ba0e6f0fb84cacbd0bc7;hpb=81a09690b36b3a4e89b4dae34f30933de13f7f90 diff --git a/fhi_lib/lib/src/xran_printf.h b/fhi_lib/lib/src/xran_printf.h index 8649b01..e2c938b 100644 --- a/fhi_lib/lib/src/xran_printf.h +++ b/fhi_lib/lib/src/xran_printf.h @@ -1,6 +1,6 @@ /****************************************************************************** * -* Copyright (c) 2019 Intel. +* Copyright (c) 2020 Intel. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,6 +29,7 @@ #ifdef __cplusplus extern "C" { #endif + #include #include @@ -39,32 +40,32 @@ extern "C" { #ifndef WIN32 #ifdef PRINTF_LOG_OK -#define print_log(fmt, args...) printf("%s:" fmt "\n", __FUNCTION__, ## args) +#define print_log(fmt, args...) printf("%s:%d" fmt "\n", __FUNCTION__, __LINE__, ## args) #else /* PRINTF_LOG_OK */ #define print_log(fmt, args...) #endif /* PRINTF_LOG_OK */ #else -#define print_log(fmt, ...) printf("%s:" fmt "\n", __FUNCTION__, __VA_ARGS__) +#define print_log(fmt, ...) printf("%s:%d" fmt "\n", __FUNCTION__, __LINE__, __VA_ARGS__) #endif #ifndef WIN32 #ifdef PRINTF_DBG_OK -#define print_dbg(fmt, args...) printf("%s:[dbg] " fmt "\n", __FUNCTION__, ## args) +#define print_dbg(fmt, args...) printf("%s:%d[dbg] " fmt "\n", __FUNCTION__, __LINE__, ## args) #else /* PRINTF_LOG_OK */ #define print_dbg(fmt, args...) #endif /* PRINTF_LOG_OK */ #else -#define print_dbg(fmt, ...) printf("%s:[dbg] " fmt "\n", __FUNCTION__, __VA_ARGS__) +#define print_dbg(fmt, ...) printf("%s:%d[dbg] " fmt "\n", __FUNCTION__, __LINE__, __VA_ARGS__) #endif #ifndef WIN32 #ifdef PRINTF_ERR_OK -#define print_err(fmt, args...) printf("%s:[err] " fmt "\n", __FUNCTION__, ## args) +#define print_err(fmt, args...) printf("%s:%d[err] " fmt "\n", __FUNCTION__, __LINE__, ## args) #else /* PRINTF_LOG_OK */ #define print_err(fmt, args...) #endif /* PRINTF_LOG_OK */ #else -#define print_err(fmt, ...) printf("%s:[err] " fmt "\n", __FUNCTION__, __VA_ARGS__) +#define print_err(fmt, ...) printf("%s:%d[err] " fmt "\n", __FUNCTION__, __LINE__, __VA_ARGS__) #endif #ifndef WIN32