mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +02:00
zapit-debug: hack to shorten debug messages
Origin commit data
------------------
Commit: 9060dff7dc
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2011-02-27 (Sun, 27 Feb 2011)
This commit is contained in:
@@ -48,14 +48,14 @@ extern int zapit_debug;
|
|||||||
do { \
|
do { \
|
||||||
if (zapit_debug) \
|
if (zapit_debug) \
|
||||||
fprintf(stdout, "[%s:%s:%d] " fmt, \
|
fprintf(stdout, "[%s:%s:%d] " fmt, \
|
||||||
__FILE__, __FUNCTION__, \
|
strrchr(__FILE__, '/'), __FUNCTION__, \
|
||||||
__LINE__ , ## args); \
|
__LINE__ , ## args); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define ERROR(str) \
|
#define ERROR(str) \
|
||||||
do { \
|
do { \
|
||||||
fprintf(stderr, "[%s:%s:%d] %s: %s\n", \
|
fprintf(stderr, "[%s:%s:%d] %s: %s\n", \
|
||||||
__FILE__, __FUNCTION__, \
|
strrchr(__FILE__, '/'), __FUNCTION__, \
|
||||||
__LINE__, str, strerror(errno)); \
|
__LINE__, str, strerror(errno)); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
@@ -64,14 +64,14 @@ extern int zapit_debug;
|
|||||||
#define INFO(fmt, args...) \
|
#define INFO(fmt, args...) \
|
||||||
do { \
|
do { \
|
||||||
fprintf(stdout, "[%s:%s:%d] " fmt "\n", \
|
fprintf(stdout, "[%s:%s:%d] " fmt "\n", \
|
||||||
__FILE__, __FUNCTION__, \
|
strrchr(__FILE__, '/'), __FUNCTION__, \
|
||||||
__LINE__ , ## args); \
|
__LINE__ , ## args); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define WARN(fmt, args...) \
|
#define WARN(fmt, args...) \
|
||||||
do { \
|
do { \
|
||||||
fprintf(stderr, "[%s:%s:%d] " fmt "\n", \
|
fprintf(stderr, "[%s:%s:%d] " fmt "\n", \
|
||||||
__FILE__, __FUNCTION__, \
|
strrchr(__FILE__, '/'), __FUNCTION__, \
|
||||||
__LINE__ , ## args); \
|
__LINE__ , ## args); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user