Skip to content
Snippets Groups Projects
Commit d8173c82 authored by Daniel Kahn Gillmor's avatar Daniel Kahn Gillmor
Browse files

Ensure that kr_log_info() gets sent promptly to stdout

If stdout is buffered, kr_log_info() might take ages to show up in the
output stream.  Since this stream could be interleaved with stderr
(e.g. kr_log_error()), it would be good to be able to see the messages
in the order in which they are generated.
parent 50eebc07
No related tags found
No related merge requests found
......@@ -28,7 +28,7 @@
/*
* Logging and debugging.
*/
#define kr_log_info(fmt, ...) printf((fmt), ## __VA_ARGS__)
#define kr_log_info(fmt, ...) do { printf((fmt), ## __VA_ARGS__); fflush(stdout); } while(0)
#define kr_log_error(fmt, ...) fprintf(stderr, (fmt), ## __VA_ARGS__)
#ifndef NDEBUG
/* Toggle debug messages */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment