diff options
author | 2019-10-03 10:22:20 +0300 | |
---|---|---|
committer | 2019-10-03 10:22:20 +0300 | |
commit | 87f165ac89990a89198f256e1794e14d2d07dae3 (patch) | |
tree | c909fb7fc6ff03e69ade2e8ed8b387b8cd4dc9d8 /include/rin | |
parent | 14d59d61634035a4f6777e43bf91affa7351a681 (diff) | |
download | librin-87f165ac89990a89198f256e1794e14d2d07dae3.tar.gz librin-87f165ac89990a89198f256e1794e14d2d07dae3.tar.bz2 librin-87f165ac89990a89198f256e1794e14d2d07dae3.zip |
diagnostic: allow setting output stream(s).
Added a function to allow changing a channel's output stream.
This also makes it possible to direct output to a file.
Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
Diffstat (limited to 'include/rin')
-rw-r--r-- | include/rin/diagnostic.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/rin/diagnostic.h b/include/rin/diagnostic.h index 64b44ef..f60008d 100644 --- a/include/rin/diagnostic.h +++ b/include/rin/diagnostic.h @@ -21,6 +21,8 @@ #ifndef LIBRIN_DIAGNOSTIC_INCLUDED #define LIBRIN_DIAGNOSTIC_INCLUDED +#include <stdio.h> + #define RIN_DIAG_SET 1 #define RIN_DIAG_UNSET 0 #define RIN_DIAG_PREFIX (1 << 0) @@ -30,7 +32,15 @@ RIN_DIAG_TIME | \ RIN_DIAG_THREADNUM) +enum rin_diag_outstream { + rin_diag_err, + rin_diag_warn, + rin_diag_fixme, + rin_diag_info +}; + int rin_diag_flags(int flag, int action); +int rin_diag_set_outstream(enum rin_diag_outstream channel, FILE *stream); void rin_err(const char *format, ...); void rin_fixme(const char *format, ...); |