From 18d9132754f67ba8f6aa8f11fcafa240a6741178 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Thu, 12 Feb 2015 16:50:53 +0100 Subject: [PATCH] Logging: Resurrected testing of log-conf --- ucw/log-conf-test.cf | 2 +- ucw/log-conf.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) 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!"); -- 2.39.2