X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=filter.c;h=d1f88539b946b571339902bbc9d950a2555365a8;hp=40fbc844b35c70fa0070ad3d9652110fc6ae83ea;hb=ad14b0d7021aa16a71098eeb70eaba66017ec53a;hpb=c4b1b0d61d89e027582aaf87aa9fc737ff5554ff diff --git a/filter.c b/filter.c index 40fbc844..d1f88539 100644 --- a/filter.c +++ b/filter.c @@ -49,27 +49,7 @@ static struct stdout_task *sot = &stdout_task_struct; /** gengetopt struct that holds the command line args */ static struct filter_args_info conf; - -/** - * standard log function that always writes to stderr - * - * \param ll loglevel. If the loglevel of the current message - * is less than \a ll, the message is going to be ignored. - * - * \param fmt the format string describing the log message. - * - */ -__printf_2_3 void para_log(int ll, const char* fmt,...) -{ - va_list argp; - - /* ignore log message if loglevel is not high enough */ - if (ll < conf.loglevel_arg) - return; - va_start(argp, fmt); - vfprintf(stderr, fmt, argp); - va_end(argp); -} +INIT_STDERR_LOGGING(conf.loglevel_arg); static void filter_event_handler(struct task *t) { @@ -134,6 +114,7 @@ static int parse_config(int argc, char *argv[]) if (filter_cmdline_parser(argc, argv, &conf)) return -E_FILTER_SYNTAX; + HANDLE_VERSION_FLAG("filter", conf); if (!cf) { char *home = para_homedir(); cf = make_message("%s/.paraslash/filter.conf", home);