If i create a thread in init_device(), but in thread function, how to send log information to device’s log target?
void MyDevice::init_device()
{
// ...
thr = new std::thread (my_thread_func); // create a user thread
// ...
}
void my_thread_func()
{
while (true) {
// background process ...
// In thread function, how to send log message to the device's log?
}
}