return do_new_configured(c);
}
+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);
+}
+
#ifdef TEST
#include "ucw/getopt.h"
/** Open a log stream configured under the specified name and increase its use count. **/
struct log_stream *log_new_configured(const char *name);
+/** Open a log stream configured under the specified name and use it as the default destination. **/
+void log_configured(const char *name);
+
/**
* Verify that a stream called @name was configured. If it wasn't, return an error
* message. This is intended to be used in configuration commit hooks.