1
1
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:
mrsmola 2007-02-18 12:43:07 +00:00
parent 209c6c76a9
commit 4dc5cb50fa

View File

@ -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);
}
}