telephonyserverplugins/simtsy/src/CSimPhBkUsimStore.cpp
branchRCL_3
changeset 65 630d2f34d719
parent 0 3553901f7fa8
child 66 07a122eea281
--- a/telephonyserverplugins/simtsy/src/CSimPhBkUsimStore.cpp	Thu Aug 19 11:03:36 2010 +0300
+++ b/telephonyserverplugins/simtsy/src/CSimPhBkUsimStore.cpp	Tue Aug 31 16:23:08 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -19,9 +19,15 @@
  @file
 */
 
+
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "CSimPhBkUsimStoreTraces.h"
+#endif
+
 #include "CSimPhBkUsimStore.h"
 #include "CSimPhone.h"
-#include "Simlog.h"
 #include <testconfigfileparser.h>
 
 const TUint16 KNpiTonInternational=145;		// < The Number Plan Identifier and Type of Number for an international telephone number.
@@ -89,7 +95,7 @@
  * @param aMaxAdditionalTextLen		The maximum length of the alpha tag in an additional telephone number.
  */
 	{
-	LOGPHBK1("Starting to parse Phonebook store additional config parameters...");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_CONSTRUCTL_1, "Starting to parse Phonebook store additional config parameters...");
 	__ASSERT_ALWAYS(aMaxNumLen<=KPhBkMaxTelNumSize,SimPanic(EPhonebookNameOrNumberTooLarge));
 	__ASSERT_ALWAYS(aMaxTextLen<=KPhBkMaxAlphaTagSize,SimPanic(EPhonebookNameOrNumberTooLarge));
 
@@ -135,7 +141,7 @@
 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,ipc);
 		if(ret!=KErrNone)
 			{
-			LOGPARSERR("ipc",ret,0,&KTriggerEventIPC);
+			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_CONSTRUCTL_2, "WARNING - CONFIGURATION FILE PARSING - Reading element IPC returned %d (element no. %d) from tag %s.",ret,0,KTriggerEventIPC);
 			}
 		else
 			iTriggerEventIPC.iIPC=ipc;
@@ -143,7 +149,7 @@
 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,cnt);
 		if(ret!=KErrNone)
 			{
-			LOGPARSERR("cnt",ret,1,&KTriggerEventIPC);
+			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_CONSTRUCTL_3, "WARNING - CONFIGURATION FILE PARSING - Reading element CNT returned %d (element no. %d) from tag %s.",ret,1,KTriggerEventIPC);
 			}
 		else
 			iTriggerEventIPC.iIPCCnt=cnt;
@@ -151,7 +157,7 @@
 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,event);
 		if(ret!=KErrNone)
 			{
-			LOGPARSERR("event",ret,2,&KTriggerEventIPC);
+			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_CONSTRUCTL_4, "WARNING - CONFIGURATION FILE PARSING - Reading element EVENT returned %d (element no. %d) from tag %s.",ret,2,KTriggerEventIPC);
 			}
 		else
 			iTriggerEventIPC.iEvent=RMobilePhone::TMobilePhoneSecurityEvent(event);
@@ -179,7 +185,7 @@
 				if(ret0!=KErrNone)
 					{
 					iPhBkStoreCaps=KDefaultPhBkPhoneStoreCaps;
-					LOGPARSERR("Caps:PhonebookStore",ret,0,&KPhBkPhoneUSimStoreCaps);
+					OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_CONSTRUCTL_5, "WARNING - CONFIGURATION FILE PARSING - Reading element CAPS:PHONEBOOKSTORE returned %d (element no. %d) from tag %s.",ret,0,KPhBkPhoneUSimStoreCaps);
 					}	
 
 				if(phonebookStore.MatchF(iPhBkStore)!=0)// Not this PhBkStore type
@@ -189,7 +195,7 @@
 				if(ret0!=KErrNone)
 					{
 					iPhBkStoreCaps=KDefaultPhBkPhoneStoreCaps;
-					LOGPARSERR("phonebookName",ret,1,&KPhBkPhoneUSimStoreCaps);
+					OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_CONSTRUCTL_6, "WARNING - CONFIGURATION FILE PARSING - Reading element PHONEBOOKNAME returned %d (element no. %d) from tag %s.",ret,1,KPhBkPhoneUSimStoreCaps);
 					}	
 				
 				if(phonebookName.MatchF(iPhBkStoreName)!=0)// Not this PhBkStoreName type
@@ -199,7 +205,7 @@
 				if(ret0!=KErrNone)
 					{
 					iPhBkStoreCaps=KDefaultPhBkPhoneStoreCaps;
-					LOGPARSERR("caps",ret,2,&KPhBkPhoneUSimStoreCaps);
+					OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_CONSTRUCTL_7, "WARNING - CONFIGURATION FILE PARSING - Reading element CAPS returned %d (element no. %d) from tag %s.",ret,2,KPhBkPhoneUSimStoreCaps);
 					}	
 				else
 					{
@@ -217,7 +223,7 @@
 				}
 			}
 	}
-	LOGPHBK1("...Finished parsing Phonebook store additional config parameters...");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_CONSTRUCTL_8, "...Finished parsing Phonebook store additional config parameters...");
 	}
 
 void CSimPhBkUSimStore::PopulateStoreFromConfigFileL()
@@ -231,7 +237,7 @@
  * "PhBkStoreEntry = <store name>, <slot number>, <telephone number>, <alphatag>"
  */
 	{
-	LOGPHBK1("Starting to read Phonebook store entries...");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_POPULATESTOREFROMCONFIGFILEL_1, "Starting to read Phonebook store entries...");
 	iPhBkIndividualPause=CfgFile()->ItemValue(KPhBkStoreIndividualReqPause,KDefaultPhBkStoreIndividualReqPause);
 	iPhBkBatchPause=CfgFile()->ItemValue(KPhBkStoreBatchReqPause,KDefaultPhBkStoreBatchReqPause);
 
@@ -256,7 +262,7 @@
 		ret=GetPhBkUSimEntry(item,parseIndex,phonebookStore,phonebookName,aid,index,telNum,alphaTag,npiTon,alphaTag2);
 		if(ret!=KErrNone)
 			{
-			LOGPARSERR("Phonebook Entry",ret,index,&KPhBkUSimStoreEntry);
+			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_POPULATESTOREFROMCONFIGFILEL_2, "WARNING - CONFIGURATION FILE PARSING - Reading element PHONEBOOK ENTRY returned %d (element no. %d) from tag %s.",ret,index,KPhBkUSimStoreEntry);
 			continue;
 			}
 
@@ -300,7 +306,7 @@
 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,parseIndex++,additional);
 		if(ret!=KErrNone)
 			{
-			LOGPARSERR("additional",ret,parseIndex,&KPhBkUSimStoreEntry);
+			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_POPULATESTOREFROMCONFIGFILEL_3, "WARNING - CONFIGURATION FILE PARSING - Reading element ADDITIONAL returned %d (element no. %d) from tag %s.",ret,parseIndex,KPhBkUSimStoreEntry);
 			}
 		else
 			{	
@@ -327,7 +333,7 @@
 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,parseIndex++,emails);
 		if(ret!=KErrNone)
 			{
-			LOGPARSERR("emails",ret,parseIndex,&KPhBkUSimStoreEntry);
+			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_POPULATESTOREFROMCONFIGFILEL_4, "WARNING - CONFIGURATION FILE PARSING - Reading element EMAILS returned %d (element no. %d) from tag %s.",ret,parseIndex,KPhBkUSimStoreEntry);
 			}
 		else
 		{	
@@ -348,7 +354,7 @@
 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,parseIndex++,groups);
 		if(ret!=KErrNone)
 			{
-			LOGPARSERR("groups",ret,parseIndex,&KPhBkUSimStoreEntry);
+			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_POPULATESTOREFROMCONFIGFILEL_5, "WARNING - CONFIGURATION FILE PARSING - Reading element GROUPS returned %d (element no. %d) from tag %s.",ret,parseIndex,KPhBkUSimStoreEntry);
 			}
 		else
 		{	
@@ -372,7 +378,7 @@
 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,parseIndex++,hidden);
 		if(ret!=KErrNone)
 			{
-			LOGPARSERR("emails",ret,parseIndex,&KPhBkUSimStoreEntry);
+			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_POPULATESTOREFROMCONFIGFILEL_6, "WARNING - CONFIGURATION FILE PARSING - Reading element EMAILS returned %d (element no. %d) from tag %s.",ret,parseIndex,KPhBkUSimStoreEntry);
 			}
 		else
 			iPhBkUSimStoreEntries[index].iHiddenEntry=hidden;
@@ -394,26 +400,26 @@
 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,count);
 		if(ret!=KErrNone)
 			{
-			LOGPARSERR("count",ret,0,&KPhBkError);
+			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_POPULATESTOREFROMCONFIGFILEL_7, "WARNING - CONFIGURATION FILE PARSING - Reading element COUNT returned %d (element no. %d) from tag %s.",ret,0,KPhBkError);
 			continue;
 			}
 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,error);
 		if(ret!=KErrNone)
 			{
-			LOGPARSERR("error",ret,1,&KPhBkError);
+			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_POPULATESTOREFROMCONFIGFILEL_8, "WARNING - CONFIGURATION FILE PARSING - Reading element ERROR returned %d (element no. %d) from tag %s.",ret,1,KPhBkError);
 			continue;
 			}
 		
 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,phonebookName);
 		if(ret!=KErrNone)
 			{
-			LOGPARSERR("phonebookName",ret,2,&KPhBkError);
+			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_POPULATESTOREFROMCONFIGFILEL_9, "WARNING - CONFIGURATION FILE PARSING - Reading element PHONEBOOKNAME returned %d (element no. %d) from tag %s.",ret,2,KPhBkError);
 			continue;
 			}
 		ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,phonebookStore);
 		if(ret!=KErrNone)
 			{
-			LOGPARSERR("phonebookStore",ret,3,&KPhBkError);
+			OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_POPULATESTOREFROMCONFIGFILEL_10, "WARNING - CONFIGURATION FILE PARSING - Reading element PHONEBOOKSTORE returned %d (element no. %d) from tag %s.",ret,3,KPhBkError);
 			//global phonebook error
 			continue;
 			}
@@ -430,7 +436,7 @@
 		}
 	PopulateOOBWrite();
 	PopulateOOBDelete();
-	LOGPHBK1("...Finished reading Phonebook store entries...");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_POPULATESTOREFROMCONFIGFILEL_11, "...Finished reading Phonebook store entries...");
 
 	if(iPhBkOOBWriteDuration!=-1)
 		iOOBWriteTimer->Start(iPhBkOOBWriteDuration,this,ETimerIdPhBkUSimStorOOBWrite);
@@ -456,7 +462,7 @@
 	TInt ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,parseIndex++,count);
 	if(ret!=KErrNone)
 		{
-		LOGPARSERR("count",ret,parseIndex,&KOOBPhBkUSimWrite);
+		OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_POPULATEOOBWRITE_1, "WARNING - CONFIGURATION FILE PARSING - Reading element COUNT returned %d (element no. %d) from tag %s.",ret,parseIndex,KOOBPhBkUSimWrite);
 		return;
 		}
 
@@ -466,7 +472,7 @@
 	ret=GetPhBkUSimEntry(item,parseIndex,phonebookStore,phonebookName,aid,index,telNum,alphaTag,npiTon,alphaTag2);
 	if(ret!=KErrNone)
 		{
-		LOGPARSERR("Phonebook Entry",ret,parseIndex,&KOOBPhBkUSimWrite);
+		OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_POPULATEOOBWRITE_2, "WARNING - CONFIGURATION FILE PARSING - Reading element PHONEBOOK ENTRY returned %d (element no. %d) from tag %s.",ret,parseIndex,KOOBPhBkUSimWrite);
 		return;
 		}
 
@@ -485,7 +491,7 @@
 	ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,parseIndex++,additional);
 	if(ret!=KErrNone)
 		{
-		LOGPARSERR("additional",ret,parseIndex,&KOOBPhBkUSimWrite);
+		OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_POPULATEOOBWRITE_3, "WARNING - CONFIGURATION FILE PARSING - Reading element ADDITIONAL returned %d (element no. %d) from tag %s.",ret,parseIndex,KOOBPhBkUSimWrite);
 		}
 	else
 	{	
@@ -512,7 +518,7 @@
 	ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,parseIndex++,groups);
 	if(ret!=KErrNone)
 		{
-		LOGPARSERR("groups",ret,parseIndex,&KOOBPhBkUSimWrite);
+		OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_POPULATEOOBWRITE_4, "WARNING - CONFIGURATION FILE PARSING - Reading element GROUPS returned %d (element no. %d) from tag %s.",ret,parseIndex,KOOBPhBkUSimWrite);
 		}
 	else
 	{	
@@ -535,7 +541,7 @@
 	ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,parseIndex++,emails);
 	if(ret!=KErrNone)
 		{
-		LOGPARSERR("emails",ret,parseIndex,&KOOBPhBkUSimWrite);
+		OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_POPULATEOOBWRITE_5, "WARNING - CONFIGURATION FILE PARSING - Reading element EMAILS returned %d (element no. %d) from tag %s.",ret,parseIndex,KOOBPhBkUSimWrite);
 		}
 	else
 	{	
@@ -575,7 +581,7 @@
 	TInt ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,count);
 	if(ret!=KErrNone)
 		{
-		LOGPARSERR("count",ret,0,&KOOBPhBkUSimDelete);
+		OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_POPULATEOOBDELETE_1, "WARNING - CONFIGURATION FILE PARSING - Reading element COUNT returned %d (element no. %d) from tag %s.",ret,0,KOOBPhBkUSimDelete);
 		return;
 		}
 
@@ -584,14 +590,14 @@
 	ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,phonebookStore);
 	if(ret!=KErrNone)
 		{
-		LOGPARSERR("phonebookStore",ret,1,&KOOBPhBkUSimDelete);
+		OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_POPULATEOOBDELETE_2, "WARNING - CONFIGURATION FILE PARSING - Reading element PHONEBOOKSTORE returned %d (element no. %d) from tag %s.",ret,1,KOOBPhBkUSimDelete);
 		return;
 		}
 
 	ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,phonebookName);
 	if(ret!=KErrNone)
 		{
-		LOGPARSERR("phonebookName",ret,2,&KOOBPhBkUSimDelete);
+		OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_POPULATEOOBDELETE_3, "WARNING - CONFIGURATION FILE PARSING - Reading element PHONEBOOKNAME returned %d (element no. %d) from tag %s.",ret,2,KOOBPhBkUSimDelete);
 		return;
 		}
 
@@ -604,7 +610,7 @@
 	ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,index);
 	if(ret!=KErrNone)
 		{
-		LOGPARSERR("index",ret,3,&KOOBPhBkUSimDelete);
+		OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_POPULATEOOBDELETE_4, "WARNING - CONFIGURATION FILE PARSING - Reading element INDEX returned %d (element no. %d) from tag %s.",ret,3,KOOBPhBkUSimDelete);
 		return;
 		}
 
@@ -1544,8 +1550,8 @@
 		case RMobilePhoneBookStore::ETagPBText:
 			ret=iPhBkRwBuffer->GetValue(alphaTag);
 
-			LOGPHBK2("alphaTag (ETagPBText) Length = (%d)",alphaTag.Length());
-			LOGPHBK2("Phonebook Max Text Length = (%d)",iPhBkMaxTextLen);
+			OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_WRITE_1, "alphaTag (ETagPBText) Length = (%d)",alphaTag.Length());
+			OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_WRITE_2, "Phonebook Max Text Length = (%d)",iPhBkMaxTextLen);
 
 			if(!additional && ret==KErrNone && (alphaTag.Length()<=iPhBkMaxTextLen))
 				iPhBkUSimStoreEntries[index].iAlphaTag.Copy(alphaTag);
@@ -1561,8 +1567,8 @@
 		case RMobilePhoneBookStore::ETagPBSecondName:
 			ret=iPhBkRwBuffer->GetValue(alphaTag2);
 
-			LOGPHBK2("alphaTag2 (ETagPBSecondName) Length = (%d)",alphaTag2.Length());
-			LOGPHBK2("Phonebook Max Text Length = (%d)",iPhBkMaxTextLen);
+			OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_WRITE_3, "alphaTag2 (ETagPBSecondName) Length = (%d)",alphaTag2.Length());
+			OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_WRITE_4, "Phonebook Max Text Length = (%d)",iPhBkMaxTextLen);
 
 			if(ret==KErrNone && (alphaTag2.Length()<=iPhBkMaxTextLen))
 				iPhBkUSimStoreEntries[index].iAlphaTag2.Copy(alphaTag2);
@@ -1573,8 +1579,8 @@
 		case RMobilePhoneBookStore::ETagPBNumber:
 			ret=iPhBkRwBuffer->GetValue(telNum);
 
-			LOGPHBK2("telNum (ETagPBNumber) Length = (%d)",telNum.Length());
-			LOGPHBK2("Phonebook Max Text Length = (%d)",iPhBkMaxTelNumLen);
+			OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_WRITE_5, "telNum (ETagPBNumber) Length = (%d)",telNum.Length());
+			OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_WRITE_6, "Phonebook Max Text Length = (%d)",iPhBkMaxTelNumLen);
 
 			if(!additional && ret==KErrNone && (telNum.Length()<=iPhBkMaxTelNumLen))
 				iPhBkUSimStoreEntries[index].iTelNum.Copy(telNum);
@@ -1613,8 +1619,8 @@
 		case RMobilePhoneBookStore::ETagPBGroupName:
 			ret=iPhBkRwBuffer->GetValue(bufPtr);
 
-			LOGPHBK2("bufPtr (ETagPBGroupName) Length = (%d)",bufPtr.Length());
-			LOGPHBK2("Phonebook Max Text Length = (%d)",iPhBkMaxTextLen);
+			OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_WRITE_7, "bufPtr (ETagPBGroupName) Length = (%d)",bufPtr.Length());
+			OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_WRITE_8, "Phonebook Max Text Length = (%d)",iPhBkMaxTextLen);
 
 			if(ret==KErrNone && (bufPtr.Length()<=iPhBkMaxTextLen)
 				&& (iPhBkUSimStoreEntries[index].iGroups->Count() < KMaxGroups))
@@ -1628,8 +1634,8 @@
 		case RMobilePhoneBookStore::ETagPBEmailAddress:
 			ret=iPhBkRwBuffer->GetValue(bufPtr);
 
-			LOGPHBK2("bufPtr (ETagPBEmailAddress) Length = (%d)",bufPtr.Length());
-			LOGPHBK2("Phonebook Max Text Length = (%d)",iPhBkMaxTextLen);
+			OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_WRITE_9, "bufPtr (ETagPBEmailAddress) Length = (%d)",bufPtr.Length());
+			OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_WRITE_10, "Phonebook Max Text Length = (%d)",iPhBkMaxTextLen);
 
 			if(ret==KErrNone && (bufPtr.Length()<=iPhBkMaxTextLen)
 				&& (iPhBkUSimStoreEntries[index].iEmails->Count() < iPhBkMaxEmail))
@@ -2066,7 +2072,7 @@
 		TRAPD(err,iPhBkUSimStoreEntries[iPhBkOOBWriteIndex].iAdditional=new(ELeave) CArrayFixFlat<TPhBkStoreEntry>(iPhBkAdditional+1));
 		if (err!=KErrNone)
 			{
-			LOGPHBK1("CSimPhBkUSimStore::TimerCallBack - Memory Allocation Failure");
+			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_TIMERCALLBACK_1, "CSimPhBkUSimStore::TimerCallBack - Memory Allocation Failure");
 			return;
 			}
 
@@ -2080,7 +2086,7 @@
 		TRAP(err,iPhBkUSimStoreEntries[iPhBkOOBWriteIndex].iGroups=new(ELeave) CArrayFixFlat<TPhBkUSimGroup>(KMaxGroups));
 		if (err!=KErrNone)
 			{
-			LOGPHBK1("CSimPhBkUSimStore::TimerCallBack - Memory Allocation Failure");
+			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_TIMERCALLBACK_2, "CSimPhBkUSimStore::TimerCallBack - Memory Allocation Failure");
 			return;
 			}
 
@@ -2094,7 +2100,7 @@
 		TRAP(err,iPhBkUSimStoreEntries[iPhBkOOBWriteIndex].iEmails=new(ELeave) CArrayFixFlat<TPhBkUSimEmail>(iPhBkMaxEmail+1));	
 		if (err!=KErrNone)
 			{
-			LOGPHBK1("CSimPhBkUSimStore::TimerCallBack - Memory Allocation Failure");
+			OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_TIMERCALLBACK_3, "CSimPhBkUSimStore::TimerCallBack - Memory Allocation Failure");
 			return;
 			}
 
@@ -2292,6 +2298,6 @@
 * @return CTestConfigSection a pointer to the configuration file data section
 */
 	{
-	LOGPHBK1(">>CSimPhBkUSimStore::CfgFile");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMPHBKUSIMSTORE_CFGFILE_1, ">>CSimPhBkUSimStore::CfgFile");
 	return iPhone->CfgFile();
 	}