Closed ponty closed 11 years ago
A few patches have been added fairly recently that should alleviate this somewhat, see 33cb87d48e.
AVR_LOG would be perfect if I could set the logger function in it. Something like avr->logger(VA_ARGS) instead of fprintf(stdout, VA_ARGS)
#define AVR_LOG(avr, level, ...) \
do { \
if (avr->log >= level) \
fprintf(stdout, __VA_ARGS__); \
} while(0)
I searched the code and there are a lot of printf where AVR_LOG could be used.
Yes, AVR_LOG doesn't replace all printf calls, but it takes care of the most verbose message spam. Feel free to submit further patches.
I think this one was merged it quite some time ago, closing...
It would be nice if a logger callback function could be passed to simavr. I can not redirect currently the stdout messages to Python logger in pysimavr.
Example (stdout is full of messages): http://ponty.github.com/pysimavr/usage.html#unit-test-example