mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-15 15:41:24 +01:00
include line num in log
This commit is contained in:
parent
2fcf4db58f
commit
a9e44fe132
2 changed files with 5 additions and 5 deletions
|
@ -65,9 +65,9 @@ linux_debugf( const char* format, ... )
|
|||
}
|
||||
|
||||
void
|
||||
linux_debugff( const char* func, const char* file, const char* fmt, ...)
|
||||
linux_debugff( const char* func, const char* file, int line, const char* fmt, ...)
|
||||
{
|
||||
gchar* header = g_strdup_printf( "%s:%s(): %s", file, func, fmt );
|
||||
gchar* header = g_strdup_printf( "%s:%d:%s(): %s", file, line, func, fmt );
|
||||
|
||||
va_list ap;
|
||||
va_start( ap, fmt );
|
||||
|
|
|
@ -77,10 +77,10 @@ extern void linux_debugf(const char*, ...)
|
|||
__attribute__ ((format (printf, 1, 2)));
|
||||
# define XP_DEBUGF(...) linux_debugf(__VA_ARGS__)
|
||||
|
||||
extern void linux_debugff(const char* func, const char* file, const char* fmt, ...)
|
||||
__attribute__ ((format (printf, 3, 4)));
|
||||
extern void linux_debugff(const char* func, const char* file, int line, const char* fmt, ...)
|
||||
__attribute__ ((format (printf, 4, 5)));
|
||||
# define XP_LOGFF( FMT, ... ) \
|
||||
linux_debugff( __func__, __FILE__, FMT, ##__VA_ARGS__ )
|
||||
linux_debugff( __func__, __FILE__, __LINE__, FMT, ##__VA_ARGS__ )
|
||||
#define XP_LOG(STR) \
|
||||
linux_debugff( __func__, __FILE__, "%s", STR )
|
||||
|
||||
|
|
Loading…
Reference in a new issue