From df7832c999e48fcaf9d6815420b307a77b046868 Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Wed, 15 Jan 2025 03:50:31 +0100 Subject: Add support for multiple streams in any_log --- test/log.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'test/log.c') diff --git a/test/log.c b/test/log.c index b6e2560..c3e0dd5 100644 --- a/test/log.c +++ b/test/log.c @@ -42,7 +42,17 @@ void pairs_format(FILE *stream, struct pair *pairs) int main() { - any_log_init(stdout, ANY_LOG_DEBUG); + any_log_init(ANY_LOG_DEBUG, stdout); + + FILE *streams[ANY_LOG_ALL] = { + stderr, //ANY_LOG_PANIC + stderr, //ANY_LOG_ERROR + stdout, //ANY_LOG_WARN + stdout, //ANY_LOG_INFO + stdout, //ANY_LOG_DEBUG + stdout, //ANY_LOG_TRACE + }; + memcpy(any_log_streams, streams, sizeof(streams)); // Test any_log_level_to_string log_trace("ANY_LOG_PANIC = %s", any_log_level_to_string(ANY_LOG_PANIC)); -- cgit v1.2.3