Export to GitHub

btstack - issue #152

Please remove printf from source code


Posted on May 5, 2011 by Quick Wombat

This is mostly done, but can we remove the remaining 'printf's throughout the stack source and replace with the 'log_dbg' and 'log_err'. Printf in the demo(s) code is OK.

For embedded applications 'log_dbg' seems to be nulled out, but 'log_err' is left in.

Can these be (optionally) redirected a serial port or event? Simon.

Comment #1

Posted on May 5, 2011 by Swift Ox

replacing the remaining printf and fprintf with log_dgb & log_err is fine. I started but just didn't finish that.

log_err and log_dbg are currently send to /dev/null if EMBEDDED is defined (see src/debug.h)

debug.h then can be changed to accommodate target requirements.

Comment #2

Posted on May 5, 2011 by Swift Ox

well. I'll replace them right away... gimme 5 minutes..

Comment #3

Posted on May 5, 2011 by Swift Ox

done in r1091

Status: Fixed

Labels:
Type-Defect Priority-Medium