Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
alon24 opened this issue Mar 23, 2016 · 3 comments

Comments

@alon24
Copy link
Contributor

alon24 commented Mar 23, 2016

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
Copy link
Member

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
Copy link
Contributor Author

alon24 commented Mar 23, 2016

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
#96 (comment)

@hreintke
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants