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

QoL: maybe log a UwbConnector id so we know which UwbConnector output which log message #205

Open
forwardpointer opened this issue Apr 5, 2023 · 2 comments

Comments

@forwardpointer
Copy link
Contributor

No description provided.

@abeltrano
Copy link
Contributor

abeltrano commented Apr 6, 2023

I'd also like to see something like this. I'd done this in a private build once for testing purposes, but the log output was pretty verbose. Basically, I did this:

UwbConnector {
public:
    UwbConnector(std::string name = "Unnamed") : m_name(std::move(name)) {
        m_logPrefix = std::string("[").append(m_name).append("] ");
    }
    const std::string& LogPrefix() const noexcept { return m_logPrefix; }
    void SomeFunc() { PLOG_VERBOSE << LogPrefix() << "blah blah"; // ;.. }
private:
    std::string m_logPrefix;
    std::string m_name;

@forwardpointer
Copy link
Contributor Author

This might not be needed because we switched back to having a single UwbConnector

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

2 participants