From db6df02b41ca29f422f8c7da7836a78e37b82e61 Mon Sep 17 00:00:00 2001 From: max_10 Date: Tue, 22 Jan 2019 04:15:51 +0100 Subject: [PATCH] libeplayer3-arm: debug issue shortened Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/9902c8d9317e25592b3cd2d6caa177c734cafec1 Author: max_10 Date: 2019-01-22 (Tue, 22 Jan 2019) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libeplayer3-arm/include/debug.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libeplayer3-arm/include/debug.h b/libeplayer3-arm/include/debug.h index ea27cea..ac92375 100644 --- a/libeplayer3-arm/include/debug.h +++ b/libeplayer3-arm/include/debug.h @@ -1,6 +1,10 @@ #include -#define log_error(fmt, x...) do { printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) -#define log_printf(maxlevel, level, fmt, x...) do { if (maxlevel >= level) printf("[%s:%s] " fmt, __FILE__, __FUNCTION__, ## x); } while (0) +#include + +#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) + +#define log_error(fmt, x...) do { printf("[%s:%s] " fmt, __FILENAME__, __FUNCTION__, ## x); } while (0) +#define log_printf(maxlevel, level, fmt, x...) do { if (maxlevel >= level) printf("[%s:%s] " fmt, __FILENAME__, __FUNCTION__, ## x); } while (0) /*******************************************