SmingHub / SmingRTOS

46 stars 36 forks source link

Libraries in sming should have a way to disable debug messages when not needed #96

Open alon24 opened 8 years ago

alon24 commented 8 years ago

Currently there are many libraries in the sming code, which print out debug messages all the time. (for example but not limited to, the DS1820 lib).

These messages are constantly being printed to serial and interfere with the developers (using the lib) own debug process.

We shold agree o a way to disable lib debugging: Maybe use: #define DB1820_DEBUG 0

suggestions?

patrickjahns commented 8 years ago

I second this request.

Also it would be great to generally cleanup the debug logging in Sming. Many (core) components are very verbose when logging. Some options really spam the log files (i.e. WifiEvents).

I don`t know if it is feasible or even possible - but also enabling/disabling debug logging for certain components would be great. (i.e. http server, mqtt, and so on)

For personal projects and libraries I started to define my own Logging mechanism to keep my logging seperate

alon24 commented 8 years ago

Show us u'r code, so we can replicate it...

On Wed, Mar 23, 2016, 20:53 Patrick Jahns notifications@github.com wrote:

I second this request.

Also it would be great to generally cleanup the debug logging in Sming. Many (core) components are very verbose when logging. Some options really spam the log files (i.e. WifiEvents).

I don`t know if it is feasible or even possible - but also enabling/disabling debug logging for certain components would be great. (i.e. http server, mqtt, and so on)

For personal projects and libraries I started to define my own Logging mechanism to keep my logging seperate

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/SmingHub/SmingRTOS/issues/96#issuecomment-200493287

hreintke commented 8 years ago

@alon24 @patrickjahns : There is a base for functionality like this in the Debug class. I agree withe the unnecessary verbosity of the sming framework.

My way of working is to have the debugf off and all my application debug messages using Debug.printf(...).-> can also be used from telnet. Debugf and Debug.printf() can be set on/off on runtime using commandprocessor.