nRF24 / RF24Log

A nice logging library for Arduino devices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

log() should return success

2bndy5 opened this issue · comments

I think It would be a nice feature for the user to know if a logger actually logged something or not. This way the user can upgrade the message priority or reset the logLevel and try again - basically enable persistence on the user's behalf.

Do you mean something like this:

if(RF24LOGGER_debug("Weather", "The weather today is nice") == false)
{
    // debug level is disabled in the final log handler, let's try with INFO
    RF24LOGGER_info("Weather", "The weather today is nice")
}

In my opinion this solution is not a good way. The end user doesn't want to see DEBUG messages so it should be not forced to relog this message as INFO. All log messages should be well categorized by the developer into ERROR, WARN, INFO and DEBUG (with the support of sublevels). If some message contains debug information then it should be logged as DEBUG.