]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/log.h
Fixed note about res_alloc() with no resource pool active
[libucw.git] / ucw / log.h
index f2d99a0729d19e5ff79fdd06a26946743654d8d8..f6088bcb202401610f37bce3a66e446750186f43 100644 (file)
--- a/ucw/log.h
+++ b/ucw/log.h
@@ -11,7 +11,7 @@
 #ifndef _UCW_LOG_H_
 #define _UCW_LOG_H_
 
-#include "ucw/clists.h"
+#include <ucw/clists.h>
 
 /*** === Messages and streams ***/
 
@@ -179,6 +179,17 @@ static inline struct log_stream *log_default_stream(void)
   return log_stream_by_flags(0);
 }
 
+/**
+ * Make the specified stream the default destination.
+ *
+ * In fact, it takes the fixed default stream and attaches @ls as its only
+ * substream. If there were any other substreams, they are removed.
+ *
+ * Log streams created by log_file() or log_configured() are made default
+ * by calling this function.
+ **/
+void log_set_default_stream(struct log_stream *ls);
+
 /**
  * Close all open streams, un-initialize the module, free all memory and
  * reset the logging mechanism to use stderr only.