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

Log split into several parts during a real-time display #73

Open
JosueGauthier opened this issue May 9, 2023 · 1 comment
Open

Log split into several parts during a real-time display #73

JosueGauthier opened this issue May 9, 2023 · 1 comment

Comments

@JosueGauthier
Copy link

Hello,

I use fmtlog to write my logs to a terminal in real time via a macro:

#define LOG_DEBUG(...) \
    { \
        logd(__VA_ARGS__);\
        fmtlog::poll();          \
    }

The problem is that many concurrent threads are running and when displayed this produces lines split into several pieces with the start of one log and the end of another.

I searched hard and couldn't find an answer.

Thanks

@MengRao
Copy link
Owner

MengRao commented May 11, 2023

fmtlog::poll() should only be called in one thread. Or you can call startPollingThead so you don't need to call poll() yourself.

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