Skip to content

Console/Terminal Log standardization #2135

@Odyno

Description

@Odyno

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()
        );

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions