]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/log-conf.c
Opt: tests for OPT_MULTIPLE
[libucw.git] / ucw / log-conf.c
index 26d7d5c46d106eb8bb136b0275e9a8c959c9e44e..824d95fcb01df289025f44a19634584531df6214 100644 (file)
@@ -7,13 +7,13 @@
  *     of the GNU Lesser General Public License.
  */
 
-#include "ucw/lib.h"
-#include "ucw/log.h"
-#include "ucw/log-internal.h"
-#include "ucw/conf.h"
-#include "ucw/simple-lists.h"
-#include "ucw/tbf.h"
-#include "ucw/threads.h"
+#include <ucw/lib.h>
+#include <ucw/log.h>
+#include <ucw/log-internal.h>
+#include <ucw/conf.h>
+#include <ucw/simple-lists.h>
+#include <ucw/tbf.h>
+#include <ucw/threads.h>
 
 #include <stdio.h>
 #include <string.h>
@@ -336,17 +336,13 @@ log_new_configured(const char *name)
 void
 log_configured(const char *name)
 {
-  struct log_stream *ls = log_new_configured(name);
-  struct log_stream *def = log_stream_by_flags(0);
-  log_rm_substream(def, NULL);
-  log_add_substream(def, ls);
-  log_close_stream(ls);
+  log_set_default_stream(log_new_configured(name));
 }
 
 #ifdef TEST
 
 #include <unistd.h>
-#include "ucw/getopt.h"
+#include <ucw/getopt.h>
 
 int main(int argc, char **argv)
 {