about summary refs log tree commit diff stats
path: root/tests/unittests
diff options
context:
space:
mode:
authorDmitry Podgorny <pasis.ua@gmail.com>2015-06-22 11:30:23 +0000
committerDmitry Podgorny <pasis.ua@gmail.com>2015-06-23 20:52:04 +0000
commite8314106693e3aeee8b5e4834fc47ddaa02efaef (patch)
treec9c22e7214845b4118f845ea94286a00535a68c3 /tests/unittests
parent2d3537515d9b0dbba51265ed7819dd80b31a33d8 (diff)
downloadprofani-tty-e8314106693e3aeee8b5e4834fc47ddaa02efaef.tar.gz
log: Introduced stderr log handler
This handler redirects stderr output to a pipe and gathers logs from the
read end.

The handler is called from main loop, therefore, if a function prints logs
to stderr they will be put to log file only after function returns.
Diffstat (limited to 'tests/unittests')
-rw-r--r--tests/unittests/log/stub_log.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/unittests/log/stub_log.c b/tests/unittests/log/stub_log.c
index c25057d8..bf9d6975 100644
--- a/tests/unittests/log/stub_log.c
+++ b/tests/unittests/log/stub_log.c
@@ -49,6 +49,10 @@ log_level_t log_level_from_string(char *log_level)
     return (log_level_t)mock();
 }
 
+void log_stderr_init(log_level_t level) {}
+void log_stderr_close(void) {}
+void log_stderr_handler(void) {}
+
 void chat_log_init(void) {}
 
 void chat_log_msg_out(const char * const barejid, const char * const msg) {}