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

Console/Terminal Log standardization #2135

Open
Odyno opened this issue Dec 17, 2024 · 0 comments
Open

Console/Terminal Log standardization #2135

Odyno opened this issue Dec 17, 2024 · 0 comments

Comments

@Odyno
Copy link
Contributor

Odyno commented Dec 17, 2024

Is your feature request related to a problem? Please describe.
It seems to me that if we have 2 or 3 modules enabled (like RF + BT + IR) it is very difficult to understand the logs on the console because each module writes something when requested without providing context (probably all assuming only their own module is active). Sometimes you log multi-lines not with a simple call to the LOG function but with a call to multiple LOGs... this makes it a nightmare to understand the flow.

Describe the solution you'd like
Having a clear console register in which registers are always contextualised and encapsulated.

Describe alternatives you've considered
Create a soft rules like:
A - The log need to have a prefix the module involved (Example "BT .... " or "RF ..." etc )
B - The log need to be encapsulated:

As example:

        Log.trace(F("Looking for Model_id: %d" CR), p->sensorModel_id);
        std::string properties = decoder.getTheengProperties(p->sensorModel_id);
        Log.trace(F("properties: %s" CR), properties.c_str());

should be

        Log.trace(F("BT - Looking for Model_id: %d with properties: %s" CR), 
                         p->sensorModel_id, 
                        decoder.getTheengProperties(p->sensorModel_id).c_str()
        );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant