usbmgmt/usbmgr/usbman/server/SRC/cusbotgwatcher.cpp
branchRCL_3
changeset 15 f92a4f87e424
parent 0 c9bc50fca66e
child 16 012cc2ee6408
--- a/usbmgmt/usbmgr/usbman/server/SRC/cusbotgwatcher.cpp	Thu Jul 15 20:42:20 2010 +0300
+++ b/usbmgmt/usbmgr/usbman/server/SRC/cusbotgwatcher.cpp	Tue Aug 31 17:01:47 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-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"
@@ -21,15 +21,16 @@
  @file
 */
 
+#include <usb/usbshared.h>
 #include <usb/usblogger.h>
 #include "CUsbScheduler.h"
 #include "cusbotgwatcher.h"
 #include "CUsbOtg.h"
-#include <usb/usbshared.h>
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cusbotgwatcherTraces.h"
+#endif
 
-#ifdef __FLOG_ACTIVE
-_LIT8(KLogComponent, "USBSVR-OTGWATCHER");
-#endif
 
 static _LIT_SECURITY_POLICY_PASS(KAllowAllPolicy);
 static _LIT_SECURITY_POLICY_S1(KNetworkControlPolicy,KUsbmanSvrSid,ECapabilityNetworkControl);
@@ -50,8 +51,9 @@
 CUsbOtgBaseWatcher::CUsbOtgBaseWatcher(RUsbOtgDriver& aLdd)
 	: CActive(CActive::EPriorityStandard), iLdd(aLdd)
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGBASEWATCHER_CUSBOTGBASEWATCHER_CONS_ENTRY );
 	CActiveScheduler::Add(this);
+	OstTraceFunctionExit0( CUSBOTGBASEWATCHER_CUSBOTGBASEWATCHER_CONS_EXIT );
 	}
 
 /**
@@ -63,8 +65,9 @@
  */
 CUsbOtgBaseWatcher::~CUsbOtgBaseWatcher()
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGBASEWATCHER_CUSBOTGBASEWATCHER_DES_ENTRY );
 	Cancel();
+	OstTraceFunctionExit0( CUSBOTGBASEWATCHER_CUSBOTGBASEWATCHER_DES_EXIT );
 	}
 
 /**
@@ -72,8 +75,9 @@
  */
 void CUsbOtgBaseWatcher::Start()
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGBASEWATCHER_START_ENTRY );
 	Post();
+	OstTraceFunctionExit0( CUSBOTGBASEWATCHER_START_EXIT );
 	}
 
 //---------------------------- Id-Pin watcher class --------------------------- 
@@ -89,12 +93,13 @@
  */
 CUsbOtgIdPinWatcher* CUsbOtgIdPinWatcher::NewL(RUsbOtgDriver& aLdd)
 	{
-	LOG_STATIC_FUNC_ENTRY
+	OstTraceFunctionEntry0( CUSBOTGIDPINWATCHER_NEWL_ENTRY );
 
 	CUsbOtgIdPinWatcher* self = new (ELeave) CUsbOtgIdPinWatcher(aLdd);
 	CleanupStack::PushL(self);
 	self->ConstructL();
 	CleanupStack::Pop(self);
+	OstTraceFunctionExit0( CUSBOTGIDPINWATCHER_NEWL_EXIT );
 	return self;
 	}
 
@@ -108,9 +113,10 @@
  */
 CUsbOtgIdPinWatcher::~CUsbOtgIdPinWatcher()
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGIDPINWATCHER_CUSBOTGIDPINWATCHER_DES_ENTRY );
 	Cancel();
 	RProperty::Delete(KUsbOtgIdPinPresentProperty);
+	OstTraceFunctionExit0( CUSBOTGIDPINWATCHER_CUSBOTGIDPINWATCHER_DES_EXIT );
 	}
 
 void CUsbOtgIdPinWatcher::ConstructL()
@@ -118,7 +124,7 @@
  * Performs 2nd phase construction of the OTG object.
  */
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGIDPINWATCHER_CONSTRUCTL_ENTRY );
 
 	TInt err = RProperty::Define(KUsbOtgIdPinPresentProperty, RProperty::EInt, KAllowAllPolicy, KNetworkControlPolicy);
 	if ( err != KErrNone && err != KErrAlreadyExists )
@@ -130,6 +136,7 @@
 	    {
 	    User::LeaveIfError(err);
 	    }
+	OstTraceFunctionExit0( CUSBOTGIDPINWATCHER_CONSTRUCTL_EXIT );
 	}
 
 /**
@@ -143,7 +150,8 @@
 CUsbOtgIdPinWatcher::CUsbOtgIdPinWatcher(RUsbOtgDriver& aLdd)
 	: CUsbOtgBaseWatcher(aLdd)
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGIDPINWATCHER_CUSBOTGIDPINWATCHER_CONS_ENTRY );
+	OstTraceFunctionExit0( CUSBOTGIDPINWATCHER_CUSBOTGIDPINWATCHER_CONS_EXIT );
 	}
 
 /**
@@ -151,14 +159,19 @@
  */
 void CUsbOtgIdPinWatcher::RunL()
 	{
-	LOG_FUNC
-	LOGTEXT2(_L8(">>CUsbOtgIdPinWatcher::RunL [iStatus=%d]"), iStatus.Int());
+	OstTraceFunctionEntry0( CUSBOTGIDPINWATCHER_RUNL_ENTRY );
+	OstTrace1( TRACE_NORMAL, CUSBOTGIDPINWATCHER_RUNL, "CUsbOtgIdPinWatcher::RunL;iStatus=%d", iStatus.Int() );
 
-	LEAVEIFERRORL(iStatus.Int());
+    TInt err = iStatus.Int();
+    if(err < 0)
+        {
+        OstTrace1( TRACE_NORMAL, CUSBOTGIDPINWATCHER_RUNL_DUP1, "CUsbOtgIdPinWatcher::RunL;iStatus.Int() with error=%d", err );
+        User::Leave(err);
+        }
 	
 	Post();
 
-	LOGTEXT(_L8("<<CUsbOtgIdPinWatcher::RunL"));
+	OstTraceFunctionExit0( CUSBOTGIDPINWATCHER_RUNL_EXIT );
 	}
 
 
@@ -167,8 +180,9 @@
  */
 void CUsbOtgIdPinWatcher::DoCancel()
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGIDPINWATCHER_DOCANCEL_ENTRY );
 	iLdd.CancelOtgIdPinNotification();
+	OstTraceFunctionExit0( CUSBOTGIDPINWATCHER_DOCANCEL_EXIT );
 	}
 
 /**
@@ -176,38 +190,45 @@
  */
 void CUsbOtgIdPinWatcher::Post()
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGIDPINWATCHER_POST_ENTRY );
 
-	LOGTEXT(_L8("CUsbOtgIdPinWatcher::Post() - About to call QueueOtgIdPinNotification"));
+	OstTrace0( TRACE_NORMAL, CUSBOTGIDPINWATCHER_POST, "CUsbOtgIdPinWatcher::Post - About to call QueueOtgIdPinNotification" );
+	
 	iLdd.QueueOtgIdPinNotification(iOtgIdPin, iStatus);
 	switch (iOtgIdPin)
 		{
 		case RUsbOtgDriver::EIdPinAPlug:
 			if (RProperty::Set(KUidUsbManCategory,KUsbOtgIdPinPresentProperty,ETrue) != KErrNone)
 				{
-				LOGTEXT2(_L8(">>CUsbOtgIdPinWatcher::Post [iOtgIdPin=%d] - failed to set the property value"), iOtgIdPin);
+				OstTrace1( TRACE_NORMAL, CUSBOTGIDPINWATCHER_POST_DUP1, 
+				        "CUsbOtgIdPinWatcher::Post; [iOtgIdPin=%d] - failed to set the property value", iOtgIdPin );				
 				}
 			else
 				{
-				LOGTEXT2(_L8(">>CUsbOtgIdPinWatcher::Post [iOtgIdPin=%d] - property is set to 1"), iOtgIdPin);
+				OstTrace1( TRACE_NORMAL, CUSBOTGIDPINWATCHER_POST_DUP2, 
+				        "CUsbOtgIdPinWatcher::Post; [iOtgIdPin=%d] - property is set to 1", iOtgIdPin );				
 				}
 			break;
 		case RUsbOtgDriver::EIdPinBPlug:
 		case RUsbOtgDriver::EIdPinUnknown:
 			if (RProperty::Set(KUidUsbManCategory,KUsbOtgIdPinPresentProperty,EFalse) != KErrNone)
 				{
-				LOGTEXT2(_L8(">>CUsbOtgIdPinWatcher::Post [iOtgIdPin=%d] - failed to set the property value"), iOtgIdPin);
+				OstTrace1( TRACE_NORMAL, CUSBOTGIDPINWATCHER_POST_DUP3, 
+				        "CUsbOtgIdPinWatcher::Post; [iOtgIdPin=%d] - failed to set the property value", iOtgIdPin );				
 				}
 			else
 				{
-				LOGTEXT2(_L8(">>CUsbOtgIdPinWatcher::Post [iOtgIdPin=%d] - property is set to 0"), iOtgIdPin);
+				OstTrace1( TRACE_NORMAL, CUSBOTGIDPINWATCHER_POST_DUP4, 
+				        "CUsbOtgIdPinWatcher::Post; [iOtgIdPin=%d] - property is set to 0", iOtgIdPin );				
 				}
 			break;
 		default:
-			LOGTEXT2(_L8(">>CUsbOtgIdPinWatcher::Post [iOtgIdPin=%d] is unrecognized, re-request QueueOtgIdPinNotification"), iOtgIdPin);
+			OstTrace1( TRACE_NORMAL, CUSBOTGIDPINWATCHER_POST_DUP5, 
+			        "CUsbOtgIdPinWatcher::Post; [iOtgIdPin=%d] is unrecognized, re-request QueueOtgIdPinNotification", iOtgIdPin );
 			break;
 		}
 	SetActive();
+	OstTraceFunctionExit0( CUSBOTGIDPINWATCHER_POST_EXIT );
 	}
 
 //----------------------------- VBus watcher class ---------------------------- 
@@ -223,12 +244,13 @@
  */
 CUsbOtgVbusWatcher* CUsbOtgVbusWatcher::NewL(RUsbOtgDriver& aLdd)
 	{
-	LOG_STATIC_FUNC_ENTRY
+	OstTraceFunctionEntry0( CUSBOTGVBUSWATCHER_NEWL_ENTRY );
 
 	CUsbOtgVbusWatcher* self = new (ELeave) CUsbOtgVbusWatcher(aLdd);
 	CleanupStack::PushL(self);
 	self->ConstructL();
 	CleanupStack::Pop(self);
+	OstTraceFunctionExit0( CUSBOTGVBUSWATCHER_NEWL_EXIT );
 	return self;
 	}
 
@@ -242,10 +264,11 @@
  */
 CUsbOtgVbusWatcher::~CUsbOtgVbusWatcher()
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGVBUSWATCHER_CUSBOTGVBUSWATCHER_DES_ENTRY );
 	Cancel();
 
 	RProperty::Delete(KUsbOtgVBusPoweredProperty);
+	OstTraceFunctionExit0( CUSBOTGVBUSWATCHER_CUSBOTGVBUSWATCHER_DES_EXIT );
 	}
 
 void CUsbOtgVbusWatcher::ConstructL()
@@ -253,7 +276,7 @@
  * Performs 2nd phase construction of the OTG object.
  */
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGVBUSWATCHER_CONSTRUCTL_ENTRY );
 
 	TInt err = RProperty::Define(KUsbOtgVBusPoweredProperty, RProperty::EInt, KAllowAllPolicy, KNetworkControlPolicy);
 	if ( err != KErrNone && err != KErrAlreadyExists )
@@ -265,6 +288,7 @@
 	    {
 	    User::LeaveIfError(err);
 	    }
+	OstTraceFunctionExit0( CUSBOTGVBUSWATCHER_CONSTRUCTL_EXIT );
 	}
 
 /**
@@ -277,7 +301,8 @@
 CUsbOtgVbusWatcher::CUsbOtgVbusWatcher(RUsbOtgDriver& aLdd)
 	: CUsbOtgBaseWatcher(aLdd)
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGVBUSWATCHER_CUSBOTGVBUSWATCHER_CONS_ENTRY );
+	OstTraceFunctionExit0( CUSBOTGVBUSWATCHER_CUSBOTGVBUSWATCHER_CONS_EXIT );
 	}
 
 /**
@@ -285,14 +310,19 @@
  */
 void CUsbOtgVbusWatcher::RunL()
 	{
-	LOG_FUNC
-	LOGTEXT2(_L8(">>CUsbOtgVbusWatcher::RunL [iStatus=%d]"), iStatus.Int());
+	OstTraceFunctionEntry0( CUSBOTGVBUSWATCHER_RUNL_ENTRY );
+	OstTrace1( TRACE_NORMAL, CUSBOTGVBUSWATCHER_RUNL, "CUsbOtgVbusWatcher::RunL;iStatus=%d", iStatus.Int() );
 
-	LEAVEIFERRORL(iStatus.Int());
+    TInt err = iStatus.Int();
+    if(err < 0)
+        {
+        OstTrace1( TRACE_NORMAL, CUSBOTGVBUSWATCHER_RUNL_DUP1, "CUsbOtgVbusWatcher::RunL;iStatus.Int() with error=%d", err );
+        User::Leave(err);
+        }
 
 	Post();
 
-	LOGTEXT(_L8("<<CUsbOtgVbusWatcher::RunL"));
+	OstTraceFunctionExit0( CUSBOTGVBUSWATCHER_RUNL_EXIT );
 	}
 
 
@@ -301,8 +331,9 @@
  */
 void CUsbOtgVbusWatcher::DoCancel()
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGVBUSWATCHER_DOCANCEL_ENTRY );
 	iLdd.CancelOtgVbusNotification();
+	OstTraceFunctionExit0( CUSBOTGVBUSWATCHER_DOCANCEL_EXIT );
 	}
 
 /**
@@ -310,38 +341,45 @@
  */
 void CUsbOtgVbusWatcher::Post()
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGVBUSWATCHER_POST_ENTRY );
 
-	LOGTEXT(_L8("CUsbOtgVbusWatcher::Post() - About to call QueueOtgVbusNotification"));
+	OstTrace0( TRACE_NORMAL, CUSBOTGVBUSWATCHER_POST, "CUsbOtgVbusWatcher::Post - About to call QueueOtgVbusNotification" );
+	
 	iLdd.QueueOtgVbusNotification(iOtgVbus, iStatus);
 	switch (iOtgVbus)
 		{
 		case RUsbOtgDriver::EVbusHigh:
 			if (RProperty::Set(KUidUsbManCategory,KUsbOtgVBusPoweredProperty,ETrue) != KErrNone)
 				{
-				LOGTEXT2(_L8(">>CUsbOtgVbusWatcher::Post [iOtgVbus=%d](EVbusHigh) - failed to set the property value"), iOtgVbus);
+				OstTrace1( TRACE_NORMAL, CUSBOTGVBUSWATCHER_POST_DUP1, 
+				        "CUsbOtgVbusWatcher::Post;[iOtgVbus=%d](EVbusHigh) - failed to set the property value", iOtgVbus );
 				}
 			else
 				{
-				LOGTEXT2(_L8(">>CUsbOtgVbusWatcher::Post [iOtgVbus=%d](EVbusHigh) - property is set to ETrue"), iOtgVbus);
+				OstTrace1( TRACE_NORMAL, CUSBOTGVBUSWATCHER_POST_DUP2, 
+				        "CUsbOtgVbusWatcher::Post;[iOtgVbus=%d](EVbusHigh) - property is set to ETrue", iOtgVbus );
 				}
 			break;
 		case RUsbOtgDriver::EVbusLow:
 		case RUsbOtgDriver::EVbusUnknown:
 			if (RProperty::Set(KUidUsbManCategory,KUsbOtgVBusPoweredProperty,EFalse) != KErrNone)
 				{
-				LOGTEXT2(_L8(">>CUsbOtgVbusWatcher::Post [iOtgVbus=%d](1 - EVbusLow, 2 - EVbusUnknown) - failed to set the property value"), iOtgVbus);
+				OstTrace1( TRACE_NORMAL, CUSBOTGVBUSWATCHER_POST_DUP3, 
+				        "CUsbOtgVbusWatcher::Post;[iOtgVbus=%d](1 - EVbusLow, 2 - EVbusUnknown) - failed to set the property value", iOtgVbus );
 				}
 			else
 				{
-				LOGTEXT2(_L8(">>CUsbOtgVbusWatcher::Post [iOtgVbus=%d](1 - EVbusLow, 2 - EVbusUnknown) - property is set to EFalse"), iOtgVbus);
+				OstTrace1( TRACE_NORMAL, CUSBOTGVBUSWATCHER_POST_DUP4, 
+				        "CUsbOtgVbusWatcher::Post;[iOtgVbus=%d](1 - EVbusLow, 2 - EVbusUnknown) - property is set to EFalse", iOtgVbus );
 				}
 			break;
 		default:
-			LOGTEXT2(_L8(">>CUsbOtgVbusWatcher::RunL [iOtgVbus=%d] is unrecognized, re-request QueueOtgVbusNotification"), iOtgVbus);
+			OstTrace1( TRACE_NORMAL, CUSBOTGVBUSWATCHER_POST_DUP5, 
+			        "CUsbOtgVbusWatcher::Post;iOtgVbus=%d] is unrecognized, re-request QueueOtgVbusNotification", iOtgVbus );
 			break;
 		}
 	SetActive();
+	OstTraceFunctionExit0( CUSBOTGVBUSWATCHER_POST_EXIT );
 	}
 
 
@@ -358,12 +396,13 @@
  */
 CUsbOtgStateWatcher* CUsbOtgStateWatcher::NewL(RUsbOtgDriver& aLdd)
 	{
-	LOG_STATIC_FUNC_ENTRY
+	OstTraceFunctionEntry0( CUSBOTGSTATEWATCHER_NEWL_ENTRY );
 
 	CUsbOtgStateWatcher* self = new (ELeave) CUsbOtgStateWatcher(aLdd);
 	CleanupStack::PushL(self);
 	self->ConstructL();
 	CleanupStack::Pop(self);
+	OstTraceFunctionExit0( CUSBOTGSTATEWATCHER_NEWL_EXIT );
 	return self;
 	}
 
@@ -377,9 +416,10 @@
  */
 CUsbOtgStateWatcher::~CUsbOtgStateWatcher()
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGSTATEWATCHER_CUSBOTGSTATEWATCHER_DES_ENTRY );
 	Cancel();
 	RProperty::Delete(KUsbOtgStateProperty);
+	OstTraceFunctionExit0( CUSBOTGSTATEWATCHER_CUSBOTGSTATEWATCHER_DES_EXIT );
 	}
 
 void CUsbOtgStateWatcher::ConstructL()
@@ -387,7 +427,7 @@
  * Performs 2nd phase construction of the OTG object.
  */
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGSTATEWATCHER_CONSTRUCTL_ENTRY );
 
 	TInt err = RProperty::Define(KUsbOtgStateProperty, RProperty::EInt, KAllowAllPolicy, KNetworkControlPolicy);
 	if ( err != KErrNone && err != KErrAlreadyExists )
@@ -399,6 +439,7 @@
 	    {
 	    User::LeaveIfError(err);
 	    }
+	OstTraceFunctionExit0( CUSBOTGSTATEWATCHER_CONSTRUCTL_EXIT );
 	}
 
 /**
@@ -412,8 +453,9 @@
 CUsbOtgStateWatcher::CUsbOtgStateWatcher(RUsbOtgDriver& aLdd)
 	: CUsbOtgBaseWatcher(aLdd)
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGSTATEWATCHER_CUSBOTGSTATEWATCHER_CONS_ENTRY );
 	iOtgState = RUsbOtgDriver::EStateReset;
+	OstTraceFunctionExit0( CUSBOTGSTATEWATCHER_CUSBOTGSTATEWATCHER_CONS_EXIT );
 	}
 
 /**
@@ -421,14 +463,19 @@
  */
 void CUsbOtgStateWatcher::RunL()
 	{
-	LOG_FUNC
-	LOGTEXT2(_L8(">>CUsbOtgStateWatcher::RunL [iStatus=%d]"), iStatus.Int());
+	OstTraceFunctionEntry0( CUSBOTGSTATEWATCHER_RUNL_ENTRY );
+	OstTrace1( TRACE_NORMAL, CUSBOTGSTATEWATCHER_RUNL, "CUsbOtgStateWatcher::RunL;iStatus.Int()=%d", iStatus.Int() );
 
-	LEAVEIFERRORL(iStatus.Int());
+    TInt err = iStatus.Int();
+    if(err < 0)
+        {
+        OstTrace1( TRACE_NORMAL, CUSBOTGSTATEWATCHER_RUNL_DUP1, "CUsbOtgStateWatcher::RunL;iStatus.Int() with error=%d", err );
+        User::Leave(err);
+        }
 
 	Post();
 
-	LOGTEXT(_L8("<<CUsbOtgStateWatcher::RunL"));
+	OstTraceFunctionExit0( CUSBOTGSTATEWATCHER_RUNL_EXIT );
 	}
 
 
@@ -437,8 +484,9 @@
  */
 void CUsbOtgStateWatcher::DoCancel()
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGSTATEWATCHER_DOCANCEL_ENTRY );
 	iLdd.CancelOtgStateNotification();
+	OstTraceFunctionExit0( CUSBOTGSTATEWATCHER_DOCANCEL_EXIT );
 	}
 
 /**
@@ -446,17 +494,20 @@
  */
 void CUsbOtgStateWatcher::Post()
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGSTATEWATCHER_POST_ENTRY );
 
-	LOGTEXT(_L8("CUsbOtgStateWatcher::Post() - About to call QueueOtgStateNotification"));	
+	OstTrace0( TRACE_NORMAL, CUSBOTGSTATEWATCHER_POST, "CUsbOtgStateWatcher::Post - About to call QueueOtgStateNotification" );
 	iLdd.QueueOtgStateNotification(iOtgState, iStatus);
-	LOGTEXT3(_L8(">>CUsbOtgStateWatcher::RunL [iStatus=%d], iOtgState = %d"), iStatus.Int(), iOtgState);
+	OstTraceExt2( TRACE_NORMAL, CUSBOTGSTATEWATCHER_POST_DUP1, 
+	        "CUsbOtgStateWatcher::Post;[iStatus=%d], iOtgState = %d", iStatus.Int(), iOtgState );
 	if (RProperty::Set(KUidUsbManCategory,KUsbOtgStateProperty,(TInt)iOtgState) != KErrNone)
 	{
-		LOGTEXT3(_L8(">>CUsbOtgStateWatcher::RunL [iStatus=%d], iOtgState = %d - failed to set the property"), iStatus.Int(), iOtgState);
+		OstTraceExt2( TRACE_NORMAL, CUSBOTGSTATEWATCHER_POST_DUP2, 
+		        "CUsbOtgStateWatcher::Post;[iStatus=%d], iOtgState = %d - failed to set the property", iStatus.Int(), iOtgState );
 	}
 
 	SetActive();
+	OstTraceFunctionExit0( CUSBOTGSTATEWATCHER_POST_EXIT );
 	}
 
 //-------------------------- OTG Events watcher class ------------------------- 
@@ -475,12 +526,13 @@
 CUsbOtgEventWatcher* CUsbOtgEventWatcher::NewL(CUsbOtg& aOwner, RUsbOtgDriver& aLdd,
 											   RUsbOtgDriver::TOtgEvent& aOtgEvent)
 	{
-	LOG_STATIC_FUNC_ENTRY
+	OstTraceFunctionEntry0( CUSBOTGEVENTWATCHER_NEWL_ENTRY );
 
 	CUsbOtgEventWatcher* self = new (ELeave) CUsbOtgEventWatcher(aOwner, aLdd, aOtgEvent);
 	CleanupStack::PushL(self);
 	self->ConstructL();
 	CleanupStack::Pop(self);
+	OstTraceFunctionExit0( CUSBOTGEVENTWATCHER_NEWL_EXIT );
 	return self;
 	}
 
@@ -494,8 +546,9 @@
  */
 CUsbOtgEventWatcher::~CUsbOtgEventWatcher()
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGEVENTWATCHER_CUSBOTGEVENTWATCHER_DES_ENTRY );
 	Cancel();
+	OstTraceFunctionExit0( CUSBOTGEVENTWATCHER_CUSBOTGEVENTWATCHER_DES_EXIT );
 	}
 
 void CUsbOtgEventWatcher::ConstructL()
@@ -503,7 +556,8 @@
  * Performs 2nd phase construction of the OTG object.
  */
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGEVENTWATCHER_CONSTRUCTL_ENTRY );
+	OstTraceFunctionExit0( CUSBOTGEVENTWATCHER_CONSTRUCTL_EXIT );
 	}
 
 /**
@@ -519,7 +573,8 @@
 										 RUsbOtgDriver::TOtgEvent& aOtgEvent)
 	: CUsbOtgBaseWatcher(aLdd), iOwner(aOwner), iOtgEvent(aOtgEvent)
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGEVENTWATCHER_CUSBOTGEVENTWATCHER_CONS_ENTRY );
+	OstTraceFunctionExit0( CUSBOTGEVENTWATCHER_CUSBOTGEVENTWATCHER_CONS_EXIT );
 	}
 
 /**
@@ -527,11 +582,17 @@
  */
 void CUsbOtgEventWatcher::RunL()
 	{
-	LOG_FUNC
-	LOGTEXT2(_L8(">>CUsbOtgEventWatcher::RunL [iStatus=%d]"), iStatus.Int());
-
-	LEAVEIFERRORL(iStatus.Int());
-	LOGTEXT2(_L8("CUsbOtgEventWatcher::RunL() - Otg Event reported: %d"), (TInt)iOtgEvent);
+	OstTraceFunctionEntry0( CUSBOTGEVENTWATCHER_RUNL_ENTRY );
+	OstTrace1( TRACE_NORMAL, CUSBOTGEVENTWATCHER_RUNL, "CUsbOtgEventWatcher::RunL;iStatus=%d", iStatus.Int() );
+    TInt err = iStatus.Int();
+    if(err < 0)
+        {
+        OstTrace1( TRACE_NORMAL, CUSBOTGEVENTWATCHER_RUNL_DUP3, "CUsbOtgEventWatcher::RunL;iStatus.Int() with error=%d", err );
+        User::Leave(err);
+        }
+    
+	OstTrace1( TRACE_NORMAL, CUSBOTGEVENTWATCHER_RUNL_DUP1, 
+	        "CUsbOtgEventWatcher::RunL; - Otg Event reported: %d", (TInt)iOtgEvent );
 	if (  ( iOtgEvent == RUsbOtgDriver::EEventHnpDisabled )
 	    ||( iOtgEvent == RUsbOtgDriver::EEventHnpEnabled )
 	    ||( iOtgEvent == RUsbOtgDriver::EEventSrpInitiated )
@@ -541,13 +602,14 @@
 	   )
 		{
 		iOwner.NotifyOtgEvent();
-		LOGTEXT2(_L8("CUsbOtgEventWatcher::RunL() - The owner is notified about Otg Event = %d"), (TInt)iOtgEvent);
+		OstTrace1( TRACE_NORMAL, CUSBOTGEVENTWATCHER_RUNL_DUP2, 
+		        "CUsbOtgEventWatcher::RunL - The owner is notified about Otg Event = %d", (TInt)iOtgEvent );
 		}
 	Post();
-	LOGTEXT(_L8("<<CUsbOtgEventWatcher::RunL"));
+	OstTraceFunctionExit0( CUSBOTGEVENTWATCHER_RUNL_EXIT );
 	}
 
-#ifndef __FLOG_ACTIVE
+#ifndef _DEBUG
 void CUsbOtgEventWatcher::LogEventText(RUsbOtgDriver::TOtgEvent /*aState*/)
 	{
 	}
@@ -557,37 +619,48 @@
 	switch (aEvent)
 		{
 		case RUsbOtgDriver::EEventAPlugInserted:
-			LOGTEXT(_L8(" ***** A-Plug Inserted *****"));
+			OstTrace0( TRACE_NORMAL, CUSBOTGEVENTWATCHER_LOGEVENTTEXT, 
+			        "CUsbOtgEventWatcher::LogEventText ***** A-Plug Inserted *****" );
 			break;
 		case RUsbOtgDriver::EEventAPlugRemoved:
-			LOGTEXT(_L8(" ***** A-Plug Removed *****"));
+			OstTrace0( TRACE_NORMAL, CUSBOTGEVENTWATCHER_LOGEVENTTEXT_DUP1, 
+			        "CUsbOtgEventWatcher::LogEventText ***** A-Plug Removed *****" );
 			break;
 		case RUsbOtgDriver::EEventVbusRaised:
-			LOGTEXT(_L8(" ***** VBus Raised *****"));
+			OstTrace0( TRACE_NORMAL, CUSBOTGEVENTWATCHER_LOGEVENTTEXT_DUP2, 
+			        "CUsbOtgEventWatcher::LogEventText ***** VBus Raised *****" );
 			break;
 		case RUsbOtgDriver::EEventVbusDropped:
-			LOGTEXT(_L8(" ***** VBus Dropped *****"));
+			OstTrace0( TRACE_NORMAL, CUSBOTGEVENTWATCHER_LOGEVENTTEXT_DUP3, 
+			        "CUsbOtgEventWatcher::LogEventText ***** VBus Dropped *****" );
 			break;
 		case RUsbOtgDriver::EEventSrpInitiated:
-			LOGTEXT(_L8(" ***** SRP Initiated *****"));
+			OstTrace0( TRACE_NORMAL, CUSBOTGEVENTWATCHER_LOGEVENTTEXT_DUP4, 
+			        "CUsbOtgEventWatcher::LogEventText ***** SRP Initiated *****" );
 			break;
 		case RUsbOtgDriver::EEventSrpReceived:
-			LOGTEXT(_L8(" ***** SRP Received *****"));
+			OstTrace0( TRACE_NORMAL, CUSBOTGEVENTWATCHER_LOGEVENTTEXT_DUP5, 
+			        "CUsbOtgEventWatcher::LogEventText ***** SRP Received *****" );
 			break;
 		case RUsbOtgDriver::EEventHnpEnabled:
-			LOGTEXT(_L8(" ***** HNP Enabled *****"));
+			OstTrace0( TRACE_NORMAL, CUSBOTGEVENTWATCHER_LOGEVENTTEXT_DUP6, 
+			        "CUsbOtgEventWatcher::LogEventText ***** HNP Enabled *****" );
 			break;
 		case RUsbOtgDriver::EEventHnpDisabled:
-			LOGTEXT(_L8(" ***** HNP Disabled *****"));
+			OstTrace0( TRACE_NORMAL, CUSBOTGEVENTWATCHER_LOGEVENTTEXT_DUP7, 
+			        "CUsbOtgEventWatcher::LogEventText ***** HNP Disabled *****" );
 			break;
 		case RUsbOtgDriver::EEventRoleChangedToHost:
-			LOGTEXT(_L8(" ***** Role Changed to Host *****"));
+			OstTrace0( TRACE_NORMAL, CUSBOTGEVENTWATCHER_LOGEVENTTEXT_DUP8, 
+			        "CUsbOtgEventWatcher::LogEventText ***** Role Changed to Host *****" );
 			break;
 		case RUsbOtgDriver::EEventRoleChangedToDevice:
-			LOGTEXT(_L8(" ***** Role Changed to Device *****"));
+			OstTrace0( TRACE_NORMAL, CUSBOTGEVENTWATCHER_LOGEVENTTEXT_DUP9, 
+			        "CUsbOtgEventWatcher::LogEventText ***** Role Changed to Device *****" );
 			break;
 		case RUsbOtgDriver::EEventRoleChangedToIdle:
-			LOGTEXT(_L8(" ***** Role Changed to Idle *****"));
+			OstTrace0( TRACE_NORMAL, CUSBOTGEVENTWATCHER_LOGEVENTTEXT_DUP10, 
+			        "CUsbOtgEventWatcher::LogEventText ***** Role Changed to Idle *****" );
 			break;
 		default:
 			break;
@@ -600,8 +673,9 @@
  */
 void CUsbOtgEventWatcher::DoCancel()
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGEVENTWATCHER_DOCANCEL_ENTRY );
 	iLdd.CancelOtgEventRequest();
+	OstTraceFunctionExit0( CUSBOTGEVENTWATCHER_DOCANCEL_EXIT );
 	}
 
 /**
@@ -609,11 +683,12 @@
  */
 void CUsbOtgEventWatcher::Post()
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGEVENTWATCHER_POST_ENTRY );
 
-	LOGTEXT(_L8("CUsbOtgEventWatcher::Post() - About to call QueueOtgEventRequest"));	
+	OstTrace0( TRACE_NORMAL, CUSBOTGEVENTWATCHER_POST, "CUsbOtgEventWatcher::Post - About to call QueueOtgEventRequest" );
 	iLdd.QueueOtgEventRequest(iOtgEvent, iStatus);
 	SetActive();
+	OstTraceFunctionExit0( CUSBOTGEVENTWATCHER_POST_EXIT );
 	}
 
 
@@ -633,9 +708,10 @@
  */
 CUsbOtgWatcher* CUsbOtgWatcher::NewL(MUsbOtgObserver& aOwner, RUsbOtgDriver& aLdd, TUint& aOtgMessage)
 	{
-	LOG_STATIC_FUNC_ENTRY
+	OstTraceFunctionEntry0( CUSBOTGWATCHER_NEWL_ENTRY );
 
 	CUsbOtgWatcher* r = new (ELeave) CUsbOtgWatcher(aOwner, aLdd, aOtgMessage);
+	OstTraceFunctionExit0( CUSBOTGWATCHER_NEWL_EXIT );
 	return r;
 	}
 
@@ -649,8 +725,7 @@
  */
 CUsbOtgWatcher::~CUsbOtgWatcher()
 	{
-	LOG_FUNC
-	LOGTEXT2(_L8(">CUsbOtgWatcher::~CUsbOtgWatcher (0x%08x)"), (TUint32) this);
+	OstTraceFunctionEntry1( CUSBOTGWATCHER_CUSBOTGWATCHER_DES_ENTRY, this );
 	Cancel();
 	}
 
@@ -666,8 +741,9 @@
 CUsbOtgWatcher::CUsbOtgWatcher(MUsbOtgObserver& aOwner, RUsbOtgDriver& aLdd, TUint& aOtgMessage)
 	: CActive(CActive::EPriorityStandard), iOwner(aOwner), iLdd(aLdd), iOtgMessage(aOtgMessage)
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGWATCHER_CUSBOTGWATCHER_CONS_ENTRY );
 	CActiveScheduler::Add(this);
+	OstTraceFunctionExit0( CUSBOTGWATCHER_CUSBOTGWATCHER_CONS_EXIT );
 	}
 
 /**
@@ -675,17 +751,19 @@
  */
 void CUsbOtgWatcher::RunL()
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGWATCHER_RUNL_ENTRY );
 	if (iStatus.Int() != KErrNone)
 		{
-		LOGTEXT2(_L8("CUsbOtgWatcher::RunL() - Error = %d"), iStatus.Int());
+		OstTrace1( TRACE_NORMAL, CUSBOTGWATCHER_RUNL, "CUsbOtgWatcher::RunL;Error=%d", iStatus.Int() );
+		OstTraceFunctionExit0( CUSBOTGWATCHER_RUNL_EXIT );
 		return;
 		}
 
-	LOGTEXT2(_L8("CUsbOtgWatcher::RunL() - Otg Message reported: %d"), iOtgMessage);
+	OstTrace1( TRACE_NORMAL, CUSBOTGWATCHER_RUNL_DUP1, "CUsbOtgWatcher::RunL;Otg Message reported: %d", iOtgMessage );
 	iOwner.NotifyMessage();
 
 	Post();
+	OstTraceFunctionExit0( CUSBOTGWATCHER_RUNL_EXIT_DUP1 );
 	}
 
 
@@ -694,8 +772,9 @@
  */
 void CUsbOtgWatcher::DoCancel()
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGWATCHER_DOCANCEL_ENTRY );
 	iLdd.CancelOtgMessageRequest();
+	OstTraceFunctionExit0( CUSBOTGWATCHER_DOCANCEL_EXIT );
 	}
 
 
@@ -704,8 +783,9 @@
  */
 void CUsbOtgWatcher::Start()
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGWATCHER_START_ENTRY );
 	Post();
+	OstTraceFunctionExit0( CUSBOTGWATCHER_START_EXIT );
 	}
 
 /**
@@ -713,11 +793,12 @@
  */
 void CUsbOtgWatcher::Post()
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGWATCHER_POST_ENTRY );
 
-	LOGTEXT(_L8("CUsbOtgWatcher::Post() - About to call QueueOtgMessageRequest"));
+	OstTrace0( TRACE_NORMAL, CUSBOTGWATCHER_POST, "CUsbOtgWatcher::Post - About to call QueueOtgMessageRequest" );
 	iLdd.QueueOtgMessageRequest((RUsbOtgDriver::TOtgMessage&)iOtgMessage, iStatus);
 	SetActive();
+	OstTraceFunctionExit0( CUSBOTGWATCHER_POST_EXIT );
 	}
 
 
@@ -747,7 +828,7 @@
  * Performs 2nd phase construction of the OTG object.
  */
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CREQUESTSESSIONWATCHER_CONSTRUCTL_ENTRY );
 
 	TInt err = RProperty::Define(KUsbRequestSessionProperty, RProperty::EInt, KAllowAllPolicy, KRequestSessionPolicy);
 	if ( err != KErrNone && err != KErrAlreadyExists )
@@ -762,13 +843,15 @@
 	User::LeaveIfError(iProp.Attach(KUidUsbManCategory, KUsbRequestSessionProperty));
 	iProp.Subscribe(iStatus);
 	SetActive();
+	OstTraceFunctionExit0( CREQUESTSESSIONWATCHER_CONSTRUCTL_EXIT );
 	}
 
 CRequestSessionWatcher::CRequestSessionWatcher(MUsbOtgObserver& aOwner)
 	: CActive(CActive::EPriorityStandard), iOwner(aOwner)
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CREQUESTSESSIONWATCHER_CREQUESTSESSIONWATCHER_CONS_ENTRY );
 	CActiveScheduler::Add(this);
+	OstTraceFunctionExit0( CREQUESTSESSIONWATCHER_CREQUESTSESSIONWATCHER_CONS_EXIT );
 	}
 
 /**
@@ -776,8 +859,8 @@
  */
 void CRequestSessionWatcher::RunL()
 	{
-	LOG_FUNC
-	LOGTEXT2(_L8(">>CRequestSessionWatcher::RunL [iStatus=%d]"), iStatus.Int());
+	OstTraceFunctionEntry0( CREQUESTSESSIONWATCHER_RUNL_ENTRY );
+	OstTrace1( TRACE_NORMAL, CREQUESTSESSIONWATCHER_RUNL, "CRequestSessionWatcher::RunL;iStatus=%d", iStatus.Int() );
 	RDebug::Printf(">>CRequestSessionWatcher::RunL [iStatus=%d]", iStatus.Int());
 	
 	iProp.Subscribe(iStatus);
@@ -789,7 +872,7 @@
 
 	iOwner.NotifyMessage(KUsbMessageRequestSession);
 	
-	LOGTEXT(_L8("<<CRequestSessionWatcher::RunL"));
+	OstTraceFunctionExit0( CREQUESTSESSIONWATCHER_RUNL_EXIT );
 	}
 
 
@@ -798,8 +881,9 @@
  */
 void CRequestSessionWatcher::DoCancel()
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CREQUESTSESSIONWATCHER_DOCANCEL_ENTRY );
 	iProp.Cancel();
+	OstTraceFunctionExit0( CREQUESTSESSIONWATCHER_DOCANCEL_EXIT );
 	}
 
 //---------------------------- Connection Idle watcher class --------------------------- 
@@ -815,12 +899,13 @@
  */
 CUsbOtgConnectionIdleWatcher* CUsbOtgConnectionIdleWatcher::NewL(RUsbOtgDriver& aLdd)
 	{
-	LOG_STATIC_FUNC_ENTRY
+	OstTraceFunctionEntry0( CUSBOTGCONNECTIONIDLEWATCHER_NEWL_ENTRY );
 
 	CUsbOtgConnectionIdleWatcher* self = new (ELeave) CUsbOtgConnectionIdleWatcher(aLdd);
 	CleanupStack::PushL(self);
 	self->ConstructL();
 	CleanupStack::Pop(self);
+	OstTraceFunctionExit0( CUSBOTGCONNECTIONIDLEWATCHER_NEWL_EXIT );
 	return self;
 	}
 
@@ -834,9 +919,10 @@
  */
 CUsbOtgConnectionIdleWatcher::~CUsbOtgConnectionIdleWatcher()
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGCONNECTIONIDLEWATCHER_CUSBOTGCONNECTIONIDLEWATCHER_DES_ENTRY );
 	Cancel();
 	RProperty::Delete(KUsbOtgConnectionIdleProperty);
+	OstTraceFunctionExit0( CUSBOTGCONNECTIONIDLEWATCHER_CUSBOTGCONNECTIONIDLEWATCHER_DES_EXIT );
 	}
 
 /**
@@ -844,7 +930,7 @@
  */
 void CUsbOtgConnectionIdleWatcher::ConstructL()
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGCONNECTIONIDLEWATCHER_CONSTRUCTL_ENTRY );
 
 	TInt err = RProperty::Define(KUsbOtgConnectionIdleProperty, RProperty::EInt, KAllowAllPolicy, KNetworkControlPolicy);
 	if ( err != KErrNone && err != KErrAlreadyExists )
@@ -856,6 +942,7 @@
 	    {
 	    User::LeaveIfError(err);
 	    }
+	OstTraceFunctionExit0( CUSBOTGCONNECTIONIDLEWATCHER_CONSTRUCTL_EXIT );
 	}
 
 /**
@@ -869,7 +956,8 @@
 CUsbOtgConnectionIdleWatcher::CUsbOtgConnectionIdleWatcher(RUsbOtgDriver& aLdd)
 	: CUsbOtgBaseWatcher(aLdd)
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGCONNECTIONIDLEWATCHER_CUSBOTGCONNECTIONIDLEWATCHER_CONS_ENTRY );
+	OstTraceFunctionExit0( CUSBOTGCONNECTIONIDLEWATCHER_CUSBOTGCONNECTIONIDLEWATCHER_CONS_EXIT );
 	}
 
 /**
@@ -877,14 +965,20 @@
  */
 void CUsbOtgConnectionIdleWatcher::RunL()
 	{
-	LOG_FUNC
-	LOGTEXT2(_L8(">>CUsbOtgConnectionIdleWatcher::RunL [iStatus=%d]"), iStatus.Int());
-
-	LEAVEIFERRORL(iStatus.Int());
+	OstTraceFunctionEntry0( CUSBOTGCONNECTIONIDLEWATCHER_RUNL_ENTRY );
+	OstTrace1( TRACE_NORMAL, CUSBOTGCONNECTIONIDLEWATCHER_RUNL, 
+	        "CUsbOtgConnectionIdleWatcher::RunL;iStatus=%d", iStatus.Int() );
 	
+    TInt err = iStatus.Int();
+    if(err < 0)
+        {
+        OstTrace1( TRACE_NORMAL, CUSBOTGCONNECTIONIDLEWATCHER_RUNL_DUP1, "CUsbOtgConnectionIdleWatcher::RunL;iStatus.Int() with error=%d", err );
+        User::Leave(err);
+        }
+    
 	Post();
 
-	LOGTEXT(_L8("<<CUsbOtgConnectionIdleWatcher::RunL"));
+	OstTraceFunctionExit0( CUSBOTGCONNECTIONIDLEWATCHER_RUNL_EXIT );
 	}
 
 
@@ -893,8 +987,9 @@
  */
 void CUsbOtgConnectionIdleWatcher::DoCancel()
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGCONNECTIONIDLEWATCHER_DOCANCEL_ENTRY );
 	iLdd.CancelOtgConnectionNotification();
+	OstTraceFunctionExit0( CUSBOTGCONNECTIONIDLEWATCHER_DOCANCEL_EXIT );
 	}
 
 /**
@@ -902,26 +997,31 @@
  */
 void CUsbOtgConnectionIdleWatcher::Post()
 	{
-	LOG_FUNC
+	OstTraceFunctionEntry0( CUSBOTGCONNECTIONIDLEWATCHER_POST_ENTRY );
 
-	LOGTEXT(_L8("CUsbOtgConnectionIdleWatcher::Post() - About to call QueueOtgIdPinNotification"));
+	OstTrace0( TRACE_NORMAL, CUSBOTGCONNECTIONIDLEWATCHER_POST, 
+	        "CUsbOtgConnectionIdleWatcher::Post - About to call QueueOtgIdPinNotification" );
 	iLdd.QueueOtgConnectionNotification(iConnectionIdle, iStatus);
 	switch (iConnectionIdle)
 		{
 		case RUsbOtgDriver::EConnectionIdle:
 		case RUsbOtgDriver::EConnectionUnknown:
 			RProperty::Set(KUidUsbManCategory,KUsbOtgConnectionIdleProperty,ETrue);
-			LOGTEXT2(_L8(">>CUsbOtgConnectionIdleWatcher::Post [iConnectionIdle=%d] - property is set to 1"), iConnectionIdle);
+			OstTrace1( TRACE_NORMAL, CUSBOTGCONNECTIONIDLEWATCHER_POST_DUP1, 
+			        "CUsbOtgConnectionIdleWatcher::Post;[iConnectionIdle=%d] - property is set to 1", iConnectionIdle );
 			break;
 		case RUsbOtgDriver::EConnectionBusy:
 			RProperty::Set(KUidUsbManCategory,KUsbOtgConnectionIdleProperty,EFalse);
-			LOGTEXT2(_L8(">>CUsbOtgConnectionIdleWatcher::Post [iConnectionIdle=%d] - property is set to 0"), iConnectionIdle);
+			OstTrace1( TRACE_NORMAL, CUSBOTGCONNECTIONIDLEWATCHER_POST_DUP2, 
+			        "CUsbOtgConnectionIdleWatcher::Post;[iConnectionIdle=%d] - property is set to 0", iConnectionIdle );
 			break;
 		default:
-			LOGTEXT2(_L8(">>CUsbOtgConnectionIdleWatcher::Post [iConnectionIdle=%d] is unrecognized, re-request QueueOtgIdPinNotification"), iConnectionIdle);
+			OstTrace1( TRACE_NORMAL, CUSBOTGCONNECTIONIDLEWATCHER_POST_DUP3, 
+			        "CUsbOtgConnectionIdleWatcher::Post;[iConnectionIdle=%d] is unrecognized, re-request QueueOtgIdPinNotification", iConnectionIdle );
 			break;
 		}
 	SetActive();
+	OstTraceFunctionExit0( CUSBOTGCONNECTIONIDLEWATCHER_POST_EXIT );
 	}