X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=fade.c;h=2954fa32689887e9b8703f0eb34c29e710e6c072;hb=3764561bd59cac22aa4c8f5ea811eebc140af51b;hp=cbfb62308a79ab85aa73b2d3f88c77cb25a6c725;hpb=dec7044cb1edcfa814998a34d78e228f74b3e7ab;p=paraslash.git diff --git a/fade.c b/fade.c index cbfb6230..2954fa32 100644 --- a/fade.c +++ b/fade.c @@ -25,12 +25,15 @@ DECLARE_MIXER_INITS; static struct mixer supported_mixer[] = {MIXER_ARRAY}; #define FOR_EACH_MIXER(i) for ((i) = 0; (i) < NUM_SUPPORTED_MIXERS; (i)++) -__printf_2_3 void date_log(__a_unused int ll, const char *fmt, ...) +static int loglevel; +__printf_2_3 void date_log(int ll, const char *fmt, ...) { va_list argp; time_t t1; struct tm *tm; + if (ll < loglevel) + return; time(&t1); tm = localtime(&t1); printf("%d:%02d:%02d ", tm->tm_hour, tm->tm_min, tm->tm_sec); @@ -309,6 +312,7 @@ int main(int argc, char *argv[]) fade_cmdline_parser_config_file(conf.config_file_arg, &conf, ¶ms); } + loglevel = get_loglevel_by_name(conf.loglevel_arg); init_mixers(); m = get_mixer_or_die(); ret = m->open(conf.mixer_device_arg, &h);