Esempio n. 1
0
ECode HttpLog::V(
    /* [in] */ const char* fmt, ...)
{
    AutoPtr<IThread> thread = Thread::GetCurrentThread();
    String name;
    thread->GetName(&name);
    String sFormat("%d %s ");
    va_list ap;
    va_start(ap, fmt);
    sFormat.Append(fmt);
    Logger::V(LOGTAG, sFormat.string(), SystemClock::GetUptimeMillis(), name.string(), ap);
    va_end(ap);
    return NOERROR;
}
Esempio n. 2
0
static void FileSize( CString& sSize, int iSize )
	{
	CString sFormat( "(%dB)" );
	if ( iSize > 1024 )
		{
		sFormat = "(%d,%dK)";
		int iRest = iSize % 1024;
		iSize /= 1024;
		if ( iSize > 1024 )
			{
			iRest = iSize % 1024;
			sFormat = "(%d,%dM)";
			iSize /= 1024;
			}
		while ( iRest >= 10 )
			iRest = iRest / 10;
		sSize.Format( sFormat, iSize, iRest );
		}
	else
		sSize.Format( sFormat, iSize );
	}