SmingRTOS icon indicating copy to clipboard operation
SmingRTOS copied to clipboard

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

Open alon24 opened this issue 8 years ago • 3 comments

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?

alon24 avatar Mar 23 '16 13:03 alon24

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

patrickjahns avatar Mar 23 '16 18:03 patrickjahns

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

On Wed, Mar 23, 2016, 20:53 Patrick Jahns [email protected] 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

alon24 avatar Mar 23 '16 19:03 alon24

@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.

hreintke avatar Mar 23 '16 19:03 hreintke