[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bluetooth-dev] unwanted logs



Hi all,

I use the stack on a embedded system. Normally, every printf and printk are redirected on a serial port (that I linked on a console on the PC). For some reasons, we have sometimes to plug a keyboard on this serial port, and we put the speed to 9600 bauds (the keyboard only send information on serial line, but it doesn't recieve anything).
Even if I don't set any debug (from btdebug.h), there are some things that are printed on the serial port...

Just for example : The buffer read :

printk("\nHW module contains...\n");

So I have to remove every printk that can not be set and unset through a simple macro. There is a lot of printk (and some printf) to change, so I can't be synchronize easily with SourceForge CVS.

So I want to make all these printk so that they can be desactivated. The idea is for example to replace every printk by something like a DOTHER macro. This macro will be activated by default, so the behavior will be the same as now. But for people (like me) that want to remove every logs, it will be easy.

I'll replace 
printk("\nHW module contains...\n");
by
DOTHER("\nHW module contains...\n");

For the same goal, I will add a define to desactivate other logs, like errors and warning if we really don't want anything more on the console.

At the same time, I'll correct some programming errors, like to make an icrementation (i++) in a printk function...

Before I do that, I want to know if somone have a better solution to solve the problem, or another proposition for managing logs, or if someone absolutely doesn't want that I do this modification and why. Please tell me before I start to do that.

Greetings to all openBT users.
-- 
Alain Paschoud                      SMARTDATA SA
alain.paschoud@xxxxxxx.ch         PSE-A
http://www.smartdata.ch             1015 Lausanne
Phone +41-21-693'84'98              
Fax   +41-27-693'84'91              
-
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com