mirror of
https://github.com/tstellar/bygfoot.git
synced 2025-01-31 07:54:50 +01:00
added a debug-writer for debugging to console
This commit is contained in:
parent
209c6c76a9
commit
4dc5cb50fa
25
src/debug.c
25
src/debug.c
@ -201,3 +201,28 @@ debug_egg_forwards_boost_style(void)
|
||||
|
||||
return (fwds > 3);
|
||||
}
|
||||
|
||||
/**
|
||||
* debug_writer writes debug-messages to an outpot
|
||||
*
|
||||
* *file_name = the name of the file where the debug-funtion is called
|
||||
* *method_name = the name of the function where the debug-funtion is called
|
||||
* *text = the text of the debug message
|
||||
*
|
||||
* debuglevel < int_debug -> print message to output
|
||||
*/
|
||||
void
|
||||
debug_writer_out(const gchar *file_name,
|
||||
const gchar *method_name,
|
||||
const gchar *text,
|
||||
gint debuglevel)
|
||||
{
|
||||
|
||||
gint writer = option_int("int_debug_writer", &constants);
|
||||
gint debugging = option_int("int_debug", &constants);
|
||||
|
||||
if ((debuglevel < debugging) && (writer == 1))
|
||||
{
|
||||
printf("%s # %s # %s\n", file_name, method_name, text);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user