1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-15 04:42:04 +00:00

add thread cid to log

This commit is contained in:
winlin 2014-04-16 16:58:54 +08:00
parent 28231cadda
commit fdd0678bcb
3 changed files with 6 additions and 2 deletions

View file

@ -132,6 +132,7 @@ int SrsForwarder::on_publish(SrsRequest* req, std::string forward_server)
srs_error("start srs thread failed. ret=%d", ret);
return ret;
}
srs_trace("forward thread cid=%d, current_cid=%d", pthread->cid(), _srs_context->get_id());
return ret;
}

View file

@ -83,6 +83,7 @@ int SrsIngester::start()
srs_error("st_thread_create failed. ret=%d", ret);
return ret;
}
srs_trace("ingest thread cid=%d, current_cid=%d", pthread->cid(), _srs_context->get_id());
return ret;
}

View file

@ -129,7 +129,9 @@ int SrsListener::listen(int port)
}
srs_verbose("create st listen thread success.");
srs_trace("server started, listen at port=%d, type=%d, fd=%d", _port, _type, fd);
srs_trace("listen thread cid=%d, current_cid=%d, "
"listen at port=%d, type=%d, fd=%d started success",
pthread->cid(), _srs_context->get_id(), _port, _type, fd);
return ret;
}
@ -349,7 +351,7 @@ int SrsServer::initialize_st()
// set current log id.
_srs_context->generate_id();
srs_info("log set id success");
srs_trace("server main cid=%d", _srs_context->get_id());
return ret;
}