From: Martin Mares Date: Thu, 12 Feb 2015 15:50:53 +0000 (+0100) Subject: Logging: Resurrected testing of log-conf X-Git-Tag: v6.3~10 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=18d9132754f67ba8f6aa8f11fcafa240a6741178;p=libucw.git Logging: Resurrected testing of log-conf --- diff --git a/ucw/log-conf-test.cf b/ucw/log-conf-test.cf index f1d2b20a..828f6e32 100644 --- a/ucw/log-conf-test.cf +++ b/ucw/log-conf-test.cf @@ -1,4 +1,4 @@ -Include cf/libucw +Include etc/libucw Logging { diff --git a/ucw/log-conf.c b/ucw/log-conf.c index d809c11d..72bbefd8 100644 --- a/ucw/log-conf.c +++ b/ucw/log-conf.c @@ -20,6 +20,8 @@ #include #include +#ifndef TEST + /*** Configuration of streams ***/ struct stream_config { @@ -339,7 +341,7 @@ log_configured(const char *name) log_set_default_stream(log_new_configured(name)); } -#ifdef TEST +#else /* TEST */ #include #include @@ -353,6 +355,7 @@ int main(int argc, char **argv) int type = log_register_type("foo"); struct log_stream *ls = log_new_configured("combined"); + log_drop_stderr(); for (uint i=0; i<10; i++) { msg(L_INFO | ls->regnum | type, "Hello, universe!");