Revisión | 6ae376854290841d7968f9ddbfca848bca0df77e (tree) |
---|---|
Tiempo | 2013-07-05 13:05:03 |
Autor | Hiroaki Nakano <nakano.hiroaki@nttc...> |
Commiter | Hiroaki Nakano |
gettidをdebugログ出力時のみcallするようにした
Signed-off-by: Hiroaki Nakano <nakano.hiroaki@nttcom.co.jp>
@@ -192,9 +192,6 @@ void l7vsd::list_virtual_service_verbose(l7vsd_response *response, error_code | ||
192 | 192 | //! @param[out] error_code |
193 | 193 | void l7vsd::add_virtual_service(const virtualservice_element *in_vselement, error_code &err) |
194 | 194 | { |
195 | - pid_t tid; | |
196 | - tid = get_tid::gettid(); | |
197 | - | |
198 | 195 | Logger logger(LOG_CAT_L7VSD_MAINTHREAD, 7, "l7vsd::add_virtual_service", __FILE__, __LINE__); |
199 | 196 | |
200 | 197 | boost::mutex::scoped_lock command_lock(command_mutex); |
@@ -209,6 +206,9 @@ void l7vsd::add_virtual_service(const virtualservice_element *in_vselement, e | ||
209 | 206 | |
210 | 207 | /*-------- DEBUG LOG --------*/ |
211 | 208 | if (LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_MAINTHREAD)) { |
209 | + pid_t tid; | |
210 | + tid = get_tid::gettid(); | |
211 | + | |
212 | 212 | std::stringstream debugstr; |
213 | 213 | debugstr << "l7vsd::add_virtual_service arguments:"; |
214 | 214 | debugstr << boost::format("tid=%d") % tid; |
@@ -328,9 +328,6 @@ void l7vsd::add_virtual_service(const virtualservice_element *in_vselement, e | ||
328 | 328 | //! @param[out] error_code |
329 | 329 | void l7vsd::del_virtual_service(const virtualservice_element *in_vselement, error_code &err) |
330 | 330 | { |
331 | - pid_t tid; | |
332 | - tid = get_tid::gettid(); | |
333 | - | |
334 | 331 | Logger logger(LOG_CAT_L7VSD_MAINTHREAD, 9, "l7vsd::del_virtual_service", __FILE__, __LINE__); |
335 | 332 | |
336 | 333 | boost::mutex::scoped_lock command_lock(command_mutex); |
@@ -345,6 +342,9 @@ void l7vsd::del_virtual_service(const virtualservice_element *in_vselement, e | ||
345 | 342 | |
346 | 343 | /*-------- DEBUG LOG --------*/ |
347 | 344 | if (LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_MAINTHREAD)) { |
345 | + pid_t tid; | |
346 | + tid = get_tid::gettid(); | |
347 | + | |
348 | 348 | std::stringstream debugstr; |
349 | 349 | debugstr << "l7vsd::del_virtual_service arguments:"; |
350 | 350 | debugstr << boost::format("tid=%d") % tid; |
@@ -70,10 +70,10 @@ int session_thread_control::start_thread() | ||
70 | 70 | // |
71 | 71 | void session_thread_control::upstream_run() |
72 | 72 | { |
73 | - pid_t tid; | |
74 | - tid = get_tid::gettid(); | |
75 | - | |
76 | 73 | if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_VIRTUALSERVICE))) { |
74 | + pid_t tid; | |
75 | + tid = get_tid::gettid(); | |
76 | + | |
77 | 77 | boost::format fmt("in_function[%d] : void session_thread_control::upstream_run()"); |
78 | 78 | fmt % tid; |
79 | 79 | Logger::putLogDebug(LOG_CAT_L7VSD_VIRTUALSERVICE, 1, fmt.str(), __FILE__, __LINE__); |
@@ -143,10 +143,10 @@ void session_thread_control::upstream_run() | ||
143 | 143 | // |
144 | 144 | void session_thread_control::downstream_run() |
145 | 145 | { |
146 | - pid_t tid; | |
147 | - tid = get_tid::gettid(); | |
148 | - | |
149 | 146 | if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_VIRTUALSERVICE))) { |
147 | + pid_t tid; | |
148 | + tid = get_tid::gettid(); | |
149 | + | |
150 | 150 | boost::format fmt("in_function[%d] : void session_thread_control::downstream_run()"); |
151 | 151 | fmt % tid; |
152 | 152 | Logger::putLogDebug(LOG_CAT_L7VSD_VIRTUALSERVICE, 4, fmt.str(), __FILE__, __LINE__); |
@@ -1561,9 +1561,6 @@ void l7vs::virtualservice_tcp::del_realserver(const l7vs::virtualservice_element | ||
1561 | 1561 | */ |
1562 | 1562 | void l7vs::virtualservice_tcp::run() |
1563 | 1563 | { |
1564 | - pid_t tid; | |
1565 | - tid = get_tid::gettid(); | |
1566 | - | |
1567 | 1564 | Logger funcLog(LOG_CAT_L7VSD_VIRTUALSERVICE, 80, "function: void virtualservice_tcp::run()", |
1568 | 1565 | __FILE__, __LINE__); |
1569 | 1566 |
@@ -1643,6 +1640,9 @@ void l7vs::virtualservice_tcp::run() | ||
1643 | 1640 | this, boost::asio::placeholders::error)); |
1644 | 1641 | |
1645 | 1642 | if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_VIRTUALSERVICE))) { |
1643 | + pid_t tid; | |
1644 | + tid = get_tid::gettid(); | |
1645 | + | |
1646 | 1646 | boost::format formatter("function: void virtualservice_tcp::run() " |
1647 | 1647 | "thread id = %d"); |
1648 | 1648 | formatter % tid; |