better logging capabilities
This commit is contained in:
parent
b31360a27a
commit
0c3c3fa8ae
3 changed files with 27 additions and 9 deletions
|
@ -298,7 +298,7 @@ void CChannel::SetNetwBufSizeFactOut ( const int iNewNetwBlSiFactOut )
|
||||||
void CChannel::OnNetwBlSiFactChange ( int iNewNetwBlSiFact )
|
void CChannel::OnNetwBlSiFactChange ( int iNewNetwBlSiFact )
|
||||||
{
|
{
|
||||||
// TEST
|
// TEST
|
||||||
qDebug ( "new network block size factor: %d", iNewNetwBlSiFact );
|
//qDebug ( "new network block size factor: %d", iNewNetwBlSiFact );
|
||||||
|
|
||||||
SetNetwBufSizeFactOut ( iNewNetwBlSiFact );
|
SetNetwBufSizeFactOut ( iNewNetwBlSiFact );
|
||||||
}
|
}
|
||||||
|
@ -340,7 +340,7 @@ void CChannel::SetSockBufSize ( const int iNumBlocks )
|
||||||
void CChannel::OnJittBufSizeChange ( int iNewJitBufSize )
|
void CChannel::OnJittBufSizeChange ( int iNewJitBufSize )
|
||||||
{
|
{
|
||||||
// TEST
|
// TEST
|
||||||
qDebug ( "new jitter buffer size: %d", iNewJitBufSize );
|
//qDebug ( "new jitter buffer size: %d", iNewJitBufSize );
|
||||||
|
|
||||||
SetSockBufSize ( iNewJitBufSize );
|
SetSockBufSize ( iNewJitBufSize );
|
||||||
}
|
}
|
||||||
|
@ -447,10 +447,10 @@ for ( int i = 0; i < iCurNetwInBlSiFact * MIN_BLOCK_SIZE_SAMPLES; i++ ) {
|
||||||
// inform other objects that new connection was established
|
// inform other objects that new connection was established
|
||||||
if ( bNewConnection )
|
if ( bNewConnection )
|
||||||
{
|
{
|
||||||
|
// log new connection
|
||||||
// TEST debug output
|
CHostAddress address ( GetAddress() );
|
||||||
CHostAddress address ( GetAddress() );
|
qDebug ( CLogTimeDate::toString() + "Connected with IP %s",
|
||||||
qDebug ( "new connection with IP %s", address.InetAddr.toString().latin1() );
|
address.InetAddr.toString().latin1() );
|
||||||
|
|
||||||
emit NewConnection();
|
emit NewConnection();
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,7 +73,7 @@ void CServer::Start ()
|
||||||
/* init time for response time evaluation */
|
/* init time for response time evaluation */
|
||||||
TimeLastBlock = QTime::currentTime ();
|
TimeLastBlock = QTime::currentTime ();
|
||||||
|
|
||||||
qDebug("Server started");
|
qDebug ( CLogTimeDate::toString() + "Server started" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ void CServer::Stop ()
|
||||||
/* stop main timer */
|
/* stop main timer */
|
||||||
Timer.stop ();
|
Timer.stop ();
|
||||||
|
|
||||||
qDebug("Server stopped");
|
qDebug ( CLogTimeDate::toString() + "Server stopped" );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CServer::OnTimer ()
|
void CServer::OnTimer ()
|
||||||
|
|
18
src/util.h
18
src/util.h
|
@ -438,4 +438,22 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/* Time and Data to String conversion --------------------------------------- */
|
||||||
|
class CLogTimeDate
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static QString toString()
|
||||||
|
{
|
||||||
|
const QDateTime curDateTime = QDateTime::currentDateTime();
|
||||||
|
|
||||||
|
// format date and time output according to "3.9.2006 11:38:08: "
|
||||||
|
return QString().setNum ( curDateTime.date().day() ) + "." +
|
||||||
|
QString().setNum ( curDateTime.date().month() ) + "." +
|
||||||
|
QString().setNum ( curDateTime.date().year() ) + " " +
|
||||||
|
curDateTime.time().toString() + ": ";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* !defined(UTIL_HOIH934256GEKJH98_3_43445KJIUHF1912__INCLUDED_) */
|
#endif /* !defined(UTIL_HOIH934256GEKJH98_3_43445KJIUHF1912__INCLUDED_) */
|
||||||
|
|
Loading…
Reference in a new issue