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

Can it use in threads? #14

Open
JaosonMa opened this issue Mar 22, 2021 · 1 comment
Open

Can it use in threads? #14

JaosonMa opened this issue Mar 22, 2021 · 1 comment

Comments

@JaosonMa
Copy link

JaosonMa commented Mar 22, 2021

`
int i[2] = { 0,1 };

string t[2] = { R"(E:\product\qqm\cv_pro\log\t1.log)",R"(E:\product\qqm\cv_pro\log\t2.log)" };

thread t1(&xxxx, i[0], t[0].c_str());

thread t2(&xxxx, i[1], t[1].c_str());

t1.join();

t2.join();

system("pause");

`
i want to use it in thread, as this code
i want log every thread with a single log file ,
can aixlog do it?
this 1.4 version do not work well , create two log files, but only ont have the log info

@miloder
Copy link

miloder commented Apr 23, 2024

I'm also interested in the answer to this, I'm using aixlog to log from different threads. In the console sometimes I get strange behaviour where the two messages from different threads and with different tags get mixed together: message A ends up being displayed with the wrong tag B, and message B never actually makes it to the console.

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