mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-18 22:26:30 +01:00
better logging
This commit is contained in:
parent
972dcfec81
commit
3737f19548
1 changed files with 4 additions and 3 deletions
|
@ -32,8 +32,8 @@ UdpThreadClosure::logStats()
|
||||||
{
|
{
|
||||||
time_t now = time( NULL );
|
time_t now = time( NULL );
|
||||||
if ( 1 < now - m_created ) {
|
if ( 1 < now - m_created ) {
|
||||||
logf( XW_LOGERROR, "packet waited %d s for processing which then took %d s",
|
logf( XW_LOGERROR, "packet %d waited %d s for processing which then took %d s",
|
||||||
m_dequed - m_created, now - m_dequed );
|
getID(), m_dequed - m_created, now - m_dequed );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -199,7 +199,8 @@ UdpQueue::thread_main()
|
||||||
pthread_mutex_unlock( &m_queueMutex );
|
pthread_mutex_unlock( &m_queueMutex );
|
||||||
|
|
||||||
utc->noteDequeued();
|
utc->noteDequeued();
|
||||||
logf( XW_LOGINFO, "%s: dispatching packet %d (socket %d)", __func__,
|
logf( XW_LOGINFO, "%s: dispatching packet %d (socket %d); "
|
||||||
|
"%d seconds old", __func__,
|
||||||
utc->getID(), utc->addr()->socket() );
|
utc->getID(), utc->addr()->socket() );
|
||||||
(*utc->cb())( utc );
|
(*utc->cb())( utc );
|
||||||
utc->logStats();
|
utc->logStats();
|
||||||
|
|
Loading…
Reference in a new issue