[mapguide-commits] r6674 - in branches/2.4/MgDev/Desktop: MgDesktop/Services MgDesktop/Services/Feature MgDesktop/System UnitTest

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon May 21 11:41:13 EDT 2012


Author: jng
Date: 2012-05-21 08:41:13 -0700 (Mon, 21 May 2012)
New Revision: 6674

Modified:
   branches/2.4/MgDev/Desktop/MgDesktop/Services/DrawingService.cpp
   branches/2.4/MgDev/Desktop/MgDesktop/Services/DrawingService.h
   branches/2.4/MgDev/Desktop/MgDesktop/Services/Feature/FeatureNumericFunctions.cpp
   branches/2.4/MgDev/Desktop/MgDesktop/Services/Feature/FeatureStringFunctions.cpp
   branches/2.4/MgDev/Desktop/MgDesktop/Services/Feature/GwsFeatureReader.cpp
   branches/2.4/MgDev/Desktop/MgDesktop/Services/Feature/JoinFeatureReader.cpp
   branches/2.4/MgDev/Desktop/MgDesktop/Services/FeatureReader.cpp
   branches/2.4/MgDev/Desktop/MgDesktop/Services/FeatureService.cpp
   branches/2.4/MgDev/Desktop/MgDesktop/Services/ProfilingService.cpp
   branches/2.4/MgDev/Desktop/MgDesktop/Services/RenderingService.cpp
   branches/2.4/MgDev/Desktop/MgDesktop/Services/ResourceService.cpp
   branches/2.4/MgDev/Desktop/MgDesktop/Services/SqlReader.cpp
   branches/2.4/MgDev/Desktop/MgDesktop/Services/TileService.cpp
   branches/2.4/MgDev/Desktop/MgDesktop/System/PlatformInit.cpp
   branches/2.4/MgDev/Desktop/UnitTest/main.cpp
Log:
mg-desktop logging enhancement part 4: Log public API access to MgTileService and MgDrawingService. Also add trace calls to public APIs and clean up some incorrect method names in logging and exception throwing statements.

Modified: branches/2.4/MgDev/Desktop/MgDesktop/Services/DrawingService.cpp
===================================================================
--- branches/2.4/MgDev/Desktop/MgDesktop/Services/DrawingService.cpp	2012-05-21 14:24:06 UTC (rev 6673)
+++ branches/2.4/MgDev/Desktop/MgDesktop/Services/DrawingService.cpp	2012-05-21 15:41:13 UTC (rev 6674)
@@ -27,10 +27,17 @@
 {
     Ptr<MgByteReader> byteReader;
 
+    MG_LOG_OPERATION_MESSAGE(L"CopyResource");
+
     MG_SERVER_DRAWING_SERVICE_TRY()
 
-    //MG_LOG_TRACE_ENTRY(L"MgDrawingService::GetDrawing()");
+    MG_LOG_OPERATION_MESSAGE_INIT(MG_API_VERSION(1, 0, 0), 1);
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == resource) ? L"MgResourceIdentifier" : resource->ToString().c_str());
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgDrawingService::GetDrawing()");
+
     if (0 == resource)
     {
         throw new MgNullArgumentException(L"MgDrawingService.GetDrawing", __LINE__, __WFILE__, NULL, L"", NULL);
@@ -46,8 +53,22 @@
     // Return the drawing via a MgByteReader
     byteReader = m_resourceService->GetResourceData(resource, dwfFileName, L"");
 
-    MG_SERVER_DRAWING_SERVICE_CATCH_AND_THROW(L"MgDrawingService.GetDrawing")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_SERVER_DRAWING_SERVICE_CATCH(L"MgDrawingService::GetDrawing")
+
+    if (mgException != NULL)
+    {
+        // Failed operation
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Failure.c_str());
+    }
+
+    // Add access log entry for operation
+    MG_LOG_OPERATION_MESSAGE_ACCESS_ENTRY();
+
+    MG_SERVER_DRAWING_SERVICE_THROW()
+
     return byteReader.Detach();
 }
 
@@ -74,10 +95,17 @@
 {
     Ptr<MgByteReader> byteReader;
 
+    MG_LOG_OPERATION_MESSAGE(L"DescribeDrawing");
+
     MG_SERVER_DRAWING_SERVICE_TRY()
 
-    //MG_LOG_TRACE_ENTRY(L"MgDrawingService::DescribeDrawing()");
+    MG_LOG_OPERATION_MESSAGE_INIT(MG_API_VERSION(1, 0, 0), 1);
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == resource) ? L"MgResourceIdentifier" : resource->ToString().c_str());
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgDrawingService::DescribeDrawing()");
+
     if (0 == resource)
     {
         throw new MgNullArgumentException(L"MgDrawingService.DescribeDrawing", __LINE__, __WFILE__, NULL, L"", NULL);
@@ -126,8 +154,22 @@
 
     MgDrawingServiceUtil::CloseDrawingResource(m_bOpenTempDwfFile, m_tempDwfFileName);
 
-    MG_SERVER_DRAWING_SERVICE_CATCH_AND_THROW(L"MgDrawingService.DescribeDrawing")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_SERVER_DRAWING_SERVICE_CATCH(L"MgDrawingService::DescribeDrawing")
+
+    if (mgException != NULL)
+    {
+        // Failed operation
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Failure.c_str());
+    }
+
+    // Add access log entry for operation
+    MG_LOG_OPERATION_MESSAGE_ACCESS_ENTRY();
+
+    MG_SERVER_DRAWING_SERVICE_THROW()
+
     return byteReader.Detach();
 }
 
@@ -162,8 +204,17 @@
 {
     Ptr<MgByteReader> byteReader;
 
+    MG_LOG_OPERATION_MESSAGE(L"GetSection");
+
     MG_SERVER_DRAWING_SERVICE_TRY()
 
+    MG_LOG_OPERATION_MESSAGE_INIT(MG_API_VERSION(1, 0, 0), 2);
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == resource) ? L"MgResourceIdentifier" : resource->ToString().c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(sectionName.c_str());
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
     MG_LOG_TRACE_ENTRY(L"MgDrawingService::GetSection()");
 
     if (0 == resource)
@@ -221,8 +272,22 @@
 
     MgDrawingServiceUtil::CloseDrawingResource(m_bOpenTempDwfFile, m_tempDwfFileName);
 
-    MG_SERVER_DRAWING_SERVICE_CATCH_AND_THROW(L"MgDrawingService.GetSection")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_SERVER_DRAWING_SERVICE_CATCH(L"MgDrawingService::GetSection")
+
+    if (mgException != NULL)
+    {
+        // Failed operation
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Failure.c_str());
+    }
+
+    // Add access log entry for operation
+    MG_LOG_OPERATION_MESSAGE_ACCESS_ENTRY();
+
+    MG_SERVER_DRAWING_SERVICE_THROW()
+
     return byteReader.Detach();
 }
 
@@ -266,8 +331,17 @@
 {
     Ptr<MgByteReader> byteReader;
 
+    MG_LOG_OPERATION_MESSAGE(L"GetSectionResource");
+
     MG_SERVER_DRAWING_SERVICE_TRY()
 
+    MG_LOG_OPERATION_MESSAGE_INIT(MG_API_VERSION(1, 0, 0), 2);
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == resource) ? L"MgResourceIdentifier" : resource->ToString().c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(resourceName.c_str());
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
     MG_LOG_TRACE_ENTRY(L"MgDrawingService::GetSectionResource()");
 
     if (0 == resource)
@@ -359,8 +433,22 @@
 
     MgDrawingServiceUtil::CloseDrawingResource(m_bOpenTempDwfFile, m_tempDwfFileName);
 
-    MG_SERVER_DRAWING_SERVICE_CATCH_AND_THROW(L"MgServicerDrawingService.GetSectionResource")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_SERVER_DRAWING_SERVICE_CATCH(L"MgDrawingService::GetSectionResource")
+
+    if (mgException != NULL)
+    {
+        // Failed operation
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Failure.c_str());
+    }
+
+    // Add access log entry for operation
+    MG_LOG_OPERATION_MESSAGE_ACCESS_ENTRY();
+
+    MG_SERVER_DRAWING_SERVICE_THROW()
+
     return byteReader.Detach();
 }
 
@@ -397,8 +485,17 @@
 {
     Ptr<MgStringCollection> layers;
 
+    MG_LOG_OPERATION_MESSAGE(L"EnumerateLayers");
+
     MG_SERVER_DRAWING_SERVICE_TRY()
 
+    MG_LOG_OPERATION_MESSAGE_INIT(MG_API_VERSION(1, 0, 0), 2);
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == resource) ? L"MgResourceIdentifier" : resource->ToString().c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(sectionName.c_str());
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
     MG_LOG_TRACE_ENTRY(L"MgDrawingService::EnumerateLayers()");
 
     if (0 == resource)
@@ -522,8 +619,22 @@
 
     MgDrawingServiceUtil::CloseDrawingResource(m_bOpenTempDwfFile, m_tempDwfFileName);
 
-    MG_SERVER_DRAWING_SERVICE_CATCH_AND_THROW(L"MgDrawingService.EnumerateLayers")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_SERVER_DRAWING_SERVICE_CATCH(L"MgDrawingService::EnumerateLayers")
+
+    if (mgException != NULL)
+    {
+        // Failed operation
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Failure.c_str());
+    }
+
+    // Add access log entry for operation
+    MG_LOG_OPERATION_MESSAGE_ACCESS_ENTRY();
+
+    MG_SERVER_DRAWING_SERVICE_THROW()
+
     return layers.Detach();
 }
 
@@ -561,8 +672,19 @@
     Ptr<MgByteReader> byteReader;
     Ptr<MgStringCollection> layers;
 
+    MG_LOG_OPERATION_MESSAGE(L"GetLayer");
+
     MG_SERVER_DRAWING_SERVICE_TRY()
 
+    MG_LOG_OPERATION_MESSAGE_INIT(MG_API_VERSION(1, 0, 0), 3);
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == resource) ? L"MgResourceIdentifier" : resource->ToString().c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(sectionName.c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(layerName.c_str());
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
     MG_LOG_TRACE_ENTRY(L"MgDrawingService::GetLayer()");
 
     if (0 == resource)
@@ -823,8 +945,22 @@
 
     MgDrawingServiceUtil::CloseDrawingResource(m_bOpenTempDwfFile, m_tempDwfFileName);
 
-    MG_SERVER_DRAWING_SERVICE_CATCH_AND_THROW(L"MgDrawingService.GetLayer")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_SERVER_DRAWING_SERVICE_CATCH(L"MgDrawingService::GetLayer")
+
+    if (mgException != NULL)
+    {
+        // Failed operation
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Failure.c_str());
+    }
+
+    // Add access log entry for operation
+    MG_LOG_OPERATION_MESSAGE_ACCESS_ENTRY();
+
+    MG_SERVER_DRAWING_SERVICE_THROW()
+
     return byteReader.Detach();
 }
 
@@ -852,8 +988,16 @@
 {
     Ptr<MgByteReader> byteReader;
 
+    MG_LOG_OPERATION_MESSAGE(L"EnumerateSections");
+
     MG_SERVER_DRAWING_SERVICE_TRY()
 
+    MG_LOG_OPERATION_MESSAGE_INIT(MG_API_VERSION(1, 0, 0), 1);
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == resource) ? L"MgResourceIdentifier" : resource->ToString().c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
     MG_LOG_TRACE_ENTRY(L"MgDrawingService::EnumerateSections()");
 
     if (0 == resource)
@@ -938,8 +1082,22 @@
 
     MgDrawingServiceUtil::CloseDrawingResource(m_bOpenTempDwfFile, m_tempDwfFileName);
 
-    MG_SERVER_DRAWING_SERVICE_CATCH_AND_THROW(L"MgDrawingService.EnumerateSections")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_SERVER_DRAWING_SERVICE_CATCH(L"MgDrawingService::EnumerateSections")
+
+    if (mgException != NULL)
+    {
+        // Failed operation
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Failure.c_str());
+    }
+
+    // Add access log entry for operation
+    MG_LOG_OPERATION_MESSAGE_ACCESS_ENTRY();
+
+    MG_SERVER_DRAWING_SERVICE_THROW()
+
     return byteReader.Detach();
 }
 
@@ -974,8 +1132,17 @@
 {
     Ptr<MgByteReader> byteReader;
 
+    MG_LOG_OPERATION_MESSAGE(L"EnumerateSectionResources");
+
     MG_SERVER_DRAWING_SERVICE_TRY()
 
+    MG_LOG_OPERATION_MESSAGE_INIT(MG_API_VERSION(1, 0, 0), 2);
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == resource) ? L"MgResourceIdentifier" : resource->ToString().c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(sectionName.c_str());
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
     MG_LOG_TRACE_ENTRY(L"MgDrawingService::EnumerateSectionResources()");
 
     if (0 == resource)
@@ -1075,8 +1242,22 @@
 
     MgDrawingServiceUtil::CloseDrawingResource(m_bOpenTempDwfFile, m_tempDwfFileName);
 
-    MG_SERVER_DRAWING_SERVICE_CATCH_AND_THROW(L"MgDrawingService.EnumerateSections")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_SERVER_DRAWING_SERVICE_CATCH(L"MgDrawingService::EnumerateSections")
+
+    if (mgException != NULL)
+    {
+        // Failed operation
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Failure.c_str());
+    }
+
+    // Add access log entry for operation
+    MG_LOG_OPERATION_MESSAGE_ACCESS_ENTRY();
+
+    MG_SERVER_DRAWING_SERVICE_THROW()
+
     return byteReader.Detach();
 }
 
@@ -1101,8 +1282,15 @@
 {
     STRING dwfCoordinateSpace = L"";
 
+    MG_LOG_OPERATION_MESSAGE(L"GetCoordinateSpace");
+
     MG_SERVER_DRAWING_SERVICE_TRY()
 
+    MG_LOG_OPERATION_MESSAGE_INIT(MG_API_VERSION(1, 0, 0), 1);
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == resource) ? L"MgResourceIdentifier" : resource->ToString().c_str());
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
     MG_LOG_TRACE_ENTRY(L"MgDrawingService::GetCoordinateSpace()");
 
     if (0 == resource)
@@ -1121,8 +1309,22 @@
         dwfCoordinateSpace = DEFAULT_COORDINATE_SPACE;
     }
 
-    MG_SERVER_DRAWING_SERVICE_CATCH_AND_THROW(L"MgDrawingService.GetCoordinateSpace")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_SERVER_DRAWING_SERVICE_CATCH(L"MgDrawingService::GetCoordinateSpace")
+
+    if (mgException != NULL)
+    {
+        // Failed operation
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Failure.c_str());
+    }
+
+    // Add access log entry for operation
+    MG_LOG_OPERATION_MESSAGE_ACCESS_ENTRY();
+
+    MG_SERVER_DRAWING_SERVICE_THROW()
+
     return dwfCoordinateSpace;
 }
 
@@ -1150,7 +1352,7 @@
     m_resourceService = static_cast<MgResourceService*>(fact->CreateService(MgServiceType::ResourceService));
     assert(m_resourceService != NULL);
 
-    MG_SERVER_DRAWING_SERVICE_CATCH_AND_THROW(L"MgDrawingServiceUtil.MgDrawingService")
+    MG_SERVER_DRAWING_SERVICE_CATCH_AND_THROW(L"MgDrawingService::MgDrawingService")
 }
 
 
@@ -1164,7 +1366,7 @@
 
     CleanUpTempFiles();
 
-    MG_SERVER_DRAWING_SERVICE_CATCH(L"MgDrawingService.~MgDrawingService")
+    MG_SERVER_DRAWING_SERVICE_CATCH(L"MgDrawingService::~MgDrawingService")
 }
 
 

Modified: branches/2.4/MgDev/Desktop/MgDesktop/Services/DrawingService.h
===================================================================
--- branches/2.4/MgDev/Desktop/MgDesktop/Services/DrawingService.h	2012-05-21 14:24:06 UTC (rev 6673)
+++ branches/2.4/MgDev/Desktop/MgDesktop/Services/DrawingService.h	2012-05-21 15:41:13 UTC (rev 6674)
@@ -241,7 +241,7 @@
 
     //////////////////////////////////////////////////////////////////
     /// <summary>
-    /// Construct an MgServerDrawingService object
+    /// Construct an MgDrawingService object
     /// </summary>
     MgDrawingService();
 

Modified: branches/2.4/MgDev/Desktop/MgDesktop/Services/Feature/FeatureNumericFunctions.cpp
===================================================================
--- branches/2.4/MgDev/Desktop/MgDesktop/Services/Feature/FeatureNumericFunctions.cpp	2012-05-21 14:24:06 UTC (rev 6673)
+++ branches/2.4/MgDev/Desktop/MgDesktop/Services/Feature/FeatureNumericFunctions.cpp	2012-05-21 15:41:13 UTC (rev 6674)
@@ -266,7 +266,7 @@
 
         MgStringCollection arguments;
         arguments.Add(message);
-        throw new MgFeatureServiceException(L"MgServerSelectFeatures.GetEqualCategories", __LINE__, __WFILE__, &arguments, L"", NULL);
+        throw new MgFeatureServiceException(L"MgFeatureNumericFunctions::GetEqualCategories", __LINE__, __WFILE__, &arguments, L"", NULL);
     }
 
     // find the range of the data values
@@ -529,7 +529,7 @@
 
         MgStringCollection arguments;
         arguments.Add(message);
-        throw new MgFeatureServiceException(L"MgServerSelectFeatures.GetEqualCategories", __LINE__, __WFILE__, &arguments, L"", NULL);
+        throw new MgFeatureServiceException(L"MgFeatureNumericFunctions::GetStandardDeviationCategories", __LINE__, __WFILE__, &arguments, L"", NULL);
     }
 
     // collect information about the data values
@@ -629,7 +629,7 @@
 
         MgStringCollection arguments;
         arguments.Add(message);
-        throw new MgFeatureServiceException(L"MgServerSelectFeatures.GetEqualCategories", __LINE__, __WFILE__, &arguments, L"", NULL);
+        throw new MgFeatureServiceException(L"MgFeatureNumericFunctions::GetQuantileCategories", __LINE__, __WFILE__, &arguments, L"", NULL);
     }
 
     int count = (int)values.size();

Modified: branches/2.4/MgDev/Desktop/MgDesktop/Services/Feature/FeatureStringFunctions.cpp
===================================================================
--- branches/2.4/MgDev/Desktop/MgDesktop/Services/Feature/FeatureStringFunctions.cpp	2012-05-21 14:24:06 UTC (rev 6673)
+++ branches/2.4/MgDev/Desktop/MgDesktop/Services/Feature/FeatureStringFunctions.cpp	2012-05-21 15:41:13 UTC (rev 6674)
@@ -187,7 +187,7 @@
                 MgStringCollection arguments;
                 arguments.Add(message);
                 throw new MgFeatureServiceException(
-                    L"MgServerSelectFeatures.ExecuteOperation", __LINE__, __WFILE__, &arguments, L"", NULL);
+                    L"MgFeatureStringFunctions.ExecuteOperation", __LINE__, __WFILE__, &arguments, L"", NULL);
             }
         }
     }

Modified: branches/2.4/MgDev/Desktop/MgDesktop/Services/Feature/GwsFeatureReader.cpp
===================================================================
--- branches/2.4/MgDev/Desktop/MgDesktop/Services/Feature/GwsFeatureReader.cpp	2012-05-21 14:24:06 UTC (rev 6673)
+++ branches/2.4/MgDev/Desktop/MgDesktop/Services/Feature/GwsFeatureReader.cpp	2012-05-21 15:41:13 UTC (rev 6674)
@@ -1388,14 +1388,14 @@
             MgStringCollection arguments;
             arguments.Add(propertyName);
 
-            throw new MgNullPropertyValueException(L"MgdGwsFeatureReader.GetGeometry",
+            throw new MgNullPropertyValueException(L"MgdGwsFeatureReader::GetGeometry",
                 __LINE__, __WFILE__, &arguments, L"", NULL);
         }
         else
             throw;
     }
 
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgServerFeatureReader.GetGeometry");
+    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgJoinFeatureReader::GetGeometry");
 
     return (BYTE_ARRAY_OUT)data;
 }

Modified: branches/2.4/MgDev/Desktop/MgDesktop/Services/Feature/JoinFeatureReader.cpp
===================================================================
--- branches/2.4/MgDev/Desktop/MgDesktop/Services/Feature/JoinFeatureReader.cpp	2012-05-21 14:24:06 UTC (rev 6673)
+++ branches/2.4/MgDev/Desktop/MgDesktop/Services/Feature/JoinFeatureReader.cpp	2012-05-21 15:41:13 UTC (rev 6674)
@@ -474,7 +474,7 @@
     IGWSFeatureIterator* gwsFeatureIter = NULL;
     STRING parsedPropertyName;
     m_reader->DeterminePropertyFeatureSource(propertyName, &gwsFeatureIter, parsedPropertyName);
-    CHECKNULL(gwsFeatureIter, L"MgServerGwsFeatureReader.GetRaster");
+    CHECKNULL(gwsFeatureIter, L"MgJoinFeatureReader::GetRaster");
 
     // TODO: The IsNull() check is returning true for WFS/WMS FDO providers when there is valid data.
     //       In this case it should really be returning false so that the data can be retrieved.
@@ -485,16 +485,16 @@
         MgStringCollection arguments;
         arguments.Add(propertyName);
 
-        throw new MgNullPropertyValueException(L"MgJoinFeatureReader.GetRaster",
+        throw new MgNullPropertyValueException(L"MgJoinFeatureReader::GetRaster",
             __LINE__, __WFILE__, &arguments, L"", NULL);
     }
     else
     {
         raster = gwsFeatureIter->GetRaster(parsedPropertyName.c_str());
-        CHECKNULL((FdoIRaster*)raster, L"MgServerGwsFeatureReader.GetRaster");
+        CHECKNULL((FdoIRaster*)raster, L"MgJoinFeatureReader::GetRaster");
     }
 
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgServerGwsFeatureReader.GetRaster");
+    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgJoinFeatureReader::GetRaster");
 
     return raster.Detach();
 }

Modified: branches/2.4/MgDev/Desktop/MgDesktop/Services/FeatureReader.cpp
===================================================================
--- branches/2.4/MgDev/Desktop/MgDesktop/Services/FeatureReader.cpp	2012-05-21 14:24:06 UTC (rev 6673)
+++ branches/2.4/MgDev/Desktop/MgDesktop/Services/FeatureReader.cpp	2012-05-21 15:41:13 UTC (rev 6674)
@@ -296,7 +296,7 @@
             MgStringCollection arguments;
             arguments.Add(propertyName);
 
-            throw new MgNullPropertyValueException(L"MgServerFdoFeatureReader.GetBLOB",
+            throw new MgNullPropertyValueException(L"MgdFeatureReader::GetBLOB",
                 __LINE__, __WFILE__, &arguments, L"", NULL);
         }
         else
@@ -332,7 +332,7 @@
             MgStringCollection arguments;
             arguments.Add(propertyName);
 
-            throw new MgNullPropertyValueException(L"MgServerFdoFeatureReader.GetCLOB",
+            throw new MgNullPropertyValueException(L"MgdFeatureReader::GetCLOB",
                 __LINE__, __WFILE__, &arguments, L"", NULL);
         }
         else
@@ -771,7 +771,7 @@
             MgStringCollection arguments;
             arguments.Add(propertyName);
 
-            throw new MgNullPropertyValueException(L"MgServerFdoFeatureReader.GetFeatureObject",
+            throw new MgNullPropertyValueException(L"MgdFeatureReader::GetFeatureObject",
                 __LINE__, __WFILE__, &arguments, L"", NULL);
         }
         else

Modified: branches/2.4/MgDev/Desktop/MgDesktop/Services/FeatureService.cpp
===================================================================
--- branches/2.4/MgDev/Desktop/MgDesktop/Services/FeatureService.cpp	2012-05-21 14:24:06 UTC (rev 6673)
+++ branches/2.4/MgDev/Desktop/MgDesktop/Services/FeatureService.cpp	2012-05-21 15:41:13 UTC (rev 6674)
@@ -238,6 +238,8 @@
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::GetFeatureProviders()");
+
     STRING xml = L"<FeatureProviderRegistry>\n";
 
     FdoPtr<IProviderRegistry> reg = FdoFeatureAccessManager::GetProviderRegistry();
@@ -417,6 +419,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(partialConnString.c_str());
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::GetConnectionPropertyValues()");
+
     if (providerName.empty())
         throw new MgInvalidArgumentException(L"MgdFeatureService::GetConnectionPropertyValues", __LINE__, __WFILE__, NULL, L"", NULL);
 
@@ -475,6 +479,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(connectionString.c_str());
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::TestConnection()");
+
 	Ptr<MgFeatureConnection> conn = new MgFeatureConnection(providerName, connectionString);
     ok = conn->IsConnectionOpen();
 
@@ -510,6 +516,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == resource) ? L"MgResourceIdentifier" : resource->ToString().c_str());
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::TestConnection()");
+
     CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::TestConnection");
 
 	Ptr<MgFeatureConnection> conn = new MgFeatureConnection(resource);
@@ -1112,7 +1120,7 @@
     caps->AddTextNode(topologyNode, "ConstrainsFeatureMovements", constrainsFeatureMovements);
 
     // TODO: Change this to CATCH_AND_THROW when SimpleDB stops throwing exception of not implemented
-    MG_FEATURE_SERVICE_CATCH(L"MgServerGetProviderCapabilities.CreateTopologyCapabilities")
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::WriteTopologyCapabilities")
 
 }
 
@@ -1129,6 +1137,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(providerName.c_str());
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::GetCapabilities()");
+
 	ret = GetCapabilities(providerName, L"");
 
     // Successful operation
@@ -1165,6 +1175,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(connectionString.c_str());
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::GetCapabilities()");
+
     if (providerName.empty())
         throw new MgInvalidArgumentException(L"MgdFeatureService::GetCapabilities", __LINE__, __WFILE__, NULL, L"", NULL);
 
@@ -1235,6 +1247,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgFeatureSchema");
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::ApplySchema()");
+
     CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::ApplySchema");
     CHECKARGUMENTNULL(schema, L"MgdFeatureService::ApplySchema");
 
@@ -1335,6 +1349,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == classNames) ? L"MgStringCollection" : classNames->GetLogString().c_str());
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::DescribeSchema()");
+
     ret = DescribeSchema(resource, schemaName, classNames, true);
 
     // Successful operation
@@ -1931,6 +1947,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(schemaName.c_str());
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::DescribeSchema()");
+
 	ret = DescribeSchema(resource, schemaName, NULL);
     
     // Successful operation
@@ -1971,6 +1989,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == classNames) ? L"MgStringCollection" : classNames->GetLogString().c_str());
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::DescribeSchemaAsXml()");
+
 	CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::DescribeSchemaAsXml");
 
     MgFeatureServiceCache* cache = MgFeatureServiceCache::GetInstance();
@@ -2056,6 +2076,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(schemaName.c_str());
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::DescribeSchemaAsXml()");
+
 	ret = DescribeSchemaAsXml(resource, schemaName, NULL);
     
     // Successful operation
@@ -2185,6 +2207,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgFeatureSchemaCollection");
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::SchemaToXml()");
+
     CHECKARGUMENTNULL(schemas, L"MgdFeatureService::SchemaToXml");
 
     FdoPtr<FdoFeatureSchemaCollection> fdoSchemaCol = MgFeatureUtil::GetFdoFeatureSchemaCollection(schemas);
@@ -2244,6 +2268,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"STRING");
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::XmlToSchema()");
+
     mgSchemaCol = new MgFeatureSchemaCollection();
 
     string mbString = MgUtil::WideCharToMultiByte(xml);
@@ -2333,6 +2359,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgFeatureQueryOptions");
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::SelectFeatures()");
+
     ret = SelectFeaturesInternal(resource, className, options, L"", false, false);
 
     // Successful operation
@@ -2375,6 +2403,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"STRING");
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::SelectFeatures()");
+
 	ret = SelectFeaturesInternal(resource, className, options, coordinateSystem, false, false);
     
     // Successful operation
@@ -2414,6 +2444,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgFeatureQueryOptions");
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::SelectFeaturesExtended()");
+
     ret = static_cast<MgdScrollableFeatureReader*>(SelectFeaturesInternal(resource, className, options, L"", false, true));
     
     // Successful operation
@@ -3674,6 +3706,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgFeatureAggregateOptions");
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::SelectAggregate()");
+
 	CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::SelectAggregate");
 	CHECKARGUMENTNULL(options, L"MgdFeatureService::SelectAggregate");
     if (className.empty())
@@ -3898,6 +3932,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_BOOL(useTransaction);
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::UpdateFeatures()");
+
 	CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::UpdateFeatures");
     CHECKARGUMENTNULL(commands, L"MgdFeatureService::UpdateFeatures");
 
@@ -3950,6 +3986,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgTransaction");
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::UpdateFeatures()");
+
 	CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::UpdateFeatures");
     CHECKARGUMENTNULL(commands, L"MgdFeatureService::UpdateFeatures");
 
@@ -4127,6 +4165,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgPropertyCollection");
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::InsertFeatures()");
+
 	ret = InsertFeatures(resource, className, propertyValues, NULL);
 
     // Successful operation
@@ -4166,6 +4206,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgTransaction");
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::InsertFeatures()");
+
     CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::InsertFeatures");
 	CHECKARGUMENTNULL(propertyValues, L"MgdFeatureService::InsertFeatures");
 	if (className.empty())
@@ -4247,6 +4289,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgBatchPropertyCollection");
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::InsertFeatures()");
+
     ret = InsertFeatures(resource, className, batchPropertyValues, NULL);
     
     // Successful operation
@@ -4285,6 +4329,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgTransaction");
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::InsertFeatures()");
+
     CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::InsertFeatures");
 	CHECKARGUMENTNULL(batchPropertyValues, L"MgdFeatureService::InsertFeatures");
 	if (className.empty())
@@ -4419,6 +4465,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"STRING");
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::UpdateFeatures()");
+
 	ret = UpdateFeatures(resource, className, propertyValues, filter, NULL);
     
     // Successful operation
@@ -4459,6 +4507,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgTransaction");
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::UpdateFeatures()");
+
     CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::UpdateFeatures");
 	CHECKARGUMENTNULL(propertyValues, L"MgdFeatureService::UpdateFeatures");
 	if (className.empty())
@@ -4540,6 +4590,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"STRING");
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::DeleteFeatures()");
+
 	ret = DeleteFeatures(resource, className, filter, NULL);
     
     // Successful operation
@@ -4578,6 +4630,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgTransaction");
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::DeleteFeatures()");
+
     CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::DeleteFeatures");
 	if (className.empty())
 		throw new MgNullArgumentException(L"MgdFeatureService::DeleteFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
@@ -4644,6 +4698,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == resource) ? L"MgResourceIdentifier" : resource->ToString().c_str());
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::PurgeCache()");
+
     MgFeatureServiceCache* cache = MgFeatureServiceCache::GetInstance();
     cache->RemoveEntry(resource);
     MgFdoConnectionPool::PurgeCachedConnections(resource);
@@ -4683,6 +4739,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgFeatureQueryOptions");
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::GetLockedFeatures()");
+
 	ret = SelectFeaturesInternal(resource, className, options, L"", true, false);
 
     // Successful operation
@@ -4716,6 +4774,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == resource) ? L"MgResourceIdentifier" : resource->ToString().c_str());
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::BeginTransaction()");
+
 	CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::BeginTransaction");
 
     Ptr<MgFeatureConnection> conn = new MgFeatureConnection(resource);
@@ -4754,6 +4814,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(sqlStatement.c_str());
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::ExecuteSqlQuery()");
+
 	CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::ExecuteSqlQuery");
     if (sqlStatement.empty())
         throw new MgInvalidArgumentException(L"MgdFeatureService::ExecuteSqlQuery", __LINE__, __WFILE__, NULL, L"", NULL);
@@ -4807,6 +4869,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgTransaction");
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::ExecuteSqlQuery()");
+
     ret = ExecuteSqlQuery(resource, sqlStatement, params, trans, m_nDataCacheSize);
 
     // Successful operation
@@ -4867,7 +4931,7 @@
 
     // Create the SQL command
     FdoPtr<FdoISQLCommand> fdoCommand = (FdoISQLCommand*)conn->CreateCommand(FdoCommandType_SQLCommand);
-    CHECKNULL((FdoISQLCommand*)fdoCommand, L"MgServerSqlCommand.ExecuteQuery");
+    CHECKNULL((FdoISQLCommand*)fdoCommand, L"MgdFeatureService::ExecuteSqlQuery");
 
     // Set SQL statement
     fdoCommand->SetSQLStatement((FdoString*)sqlStatement.c_str());
@@ -4885,7 +4949,7 @@
 
     // Execute the command
     FdoPtr<FdoISQLDataReader> sqlReader = fdoCommand->ExecuteReader();
-    CHECKNULL((FdoISQLDataReader*)sqlReader, L"MgServerSqlCommand.ExecuteQuery");
+    CHECKNULL((FdoISQLDataReader*)sqlReader, L"MgdFeatureService::ExecuteSqlQuery");
 
     // Update parameter whose direction is InputOutput, Output, or Return.
     if (NULL != params && params->GetCount() > 0)
@@ -4901,7 +4965,7 @@
                                             CREFSTRING sqlNonSelectStatement,
                                             MgParameterCollection* params,
                                             MgTransaction* trans)
-{ 
+{
     INT32 ret = 0;
     MG_LOG_OPERATION_MESSAGE(L"ExecuteSqlNonQuery");
 
@@ -4918,6 +4982,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgTransaction");
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::ExecuteSqlNonQuery()");
+
     CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::ExecuteSqlNonQuery");
     if (sqlNonSelectStatement.empty())
         throw new MgInvalidArgumentException(L"MgdFeatureService::ExecuteSqlNonQuery", __LINE__, __WFILE__, NULL, L"", NULL);
@@ -4935,7 +5001,7 @@
         Ptr<MgResourceIdentifier> origFeatureSource = mgTrans->GetFeatureSource();
         //Check that the transaction originates from the same feature source
         if (origFeatureSource->ToString() != resource->ToString())
-            throw new MgInvalidArgumentException(L"MgdFeatureService::InsertFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
+            throw new MgInvalidArgumentException(L"MgdFeatureService::ExecuteSqlNonQuery", __LINE__, __WFILE__, NULL, L"", NULL);
 
         connWrap = mgTrans->GetConnection(); //Connection is already open
         fdoTrans = mgTrans->GetFdoTransaction();
@@ -4949,7 +5015,7 @@
 
     // Create the SQL command
     FdoPtr<FdoISQLCommand> fdoCommand = (FdoISQLCommand*)conn->CreateCommand(FdoCommandType_SQLCommand);
-    CHECKNULL((FdoISQLCommand*)fdoCommand, L"MgServerSqlCommand.ExecuteQuery");
+    CHECKNULL((FdoISQLCommand*)fdoCommand, L"MgdFeatureService::ExecuteSqlNonQuery");
 
     // Set SQL statement
     fdoCommand->SetSQLStatement((FdoString*)sqlNonSelectStatement.c_str());
@@ -5002,6 +5068,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(sqlNonSelectStatement.c_str());
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::ExecuteSqlNonQuery()");
+
 	CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::ExecuteSqlNonQuery");
     if (sqlNonSelectStatement.empty())
         throw new MgInvalidArgumentException(L"MgdFeatureService::ExecuteSqlNonQuery", __LINE__, __WFILE__, NULL, L"", NULL);
@@ -5047,6 +5115,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_BOOL(bActiveOnly);
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdFeatureService::GetSpatialContexts()");
+
 	CHECK_FEATURE_SOURCE_ARGUMENT(resId, L"MgdFeatureService::GetSpatialContexts");
 	
     MgFeatureServiceCache* cache = MgFeatureServiceCache::GetInstance();

Modified: branches/2.4/MgDev/Desktop/MgDesktop/Services/ProfilingService.cpp
===================================================================
--- branches/2.4/MgDev/Desktop/MgDesktop/Services/ProfilingService.cpp	2012-05-21 14:24:06 UTC (rev 6673)
+++ branches/2.4/MgDev/Desktop/MgDesktop/Services/ProfilingService.cpp	2012-05-21 15:41:13 UTC (rev 6674)
@@ -24,7 +24,7 @@
     MG_TRY()
 
     if (NULL == map)
-        throw new MgNullArgumentException(L"MgServerProfilingService.ProfileRenderDynamicOverlay", __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgNullArgumentException(L"MgProfilingService::ProfileRenderDynamicOverlay", __LINE__, __WFILE__, NULL, L"", NULL);
 
     auto_ptr<ProfileRenderMapResult> pPRMResult; // a pointer points to Profile Render Map Result
     pPRMResult.reset(new ProfileRenderMapResult());
@@ -44,7 +44,7 @@
     string content = parser.SerializeToXML(pPRMResult.get(),version.get());
     ret = new MgByteReader(MgUtil::MultiByteToWideChar(content), MgMimeType::Xml);
 
-    MG_CATCH_AND_THROW(L"MgServerProfilingService.ProfileRenderDynamicOverlay")
+    MG_CATCH_AND_THROW(L"MgProfilingService::ProfileRenderDynamicOverlay")
 
     return ret.Detach();
 }
@@ -66,7 +66,7 @@
     MG_TRY()
 
     if (NULL == map)
-        throw new MgNullArgumentException(L"MgServerProfilingService.ProfileRenderMap", __LINE__, __WFILE__, NULL, L"", NULL);
+        throw new MgNullArgumentException(L"MgProfilingService::ProfileRenderMap", __LINE__, __WFILE__, NULL, L"", NULL);
 
     auto_ptr<ProfileRenderMapResult> pPRMResult; // a pointer points to Profile Render Map Result
     pPRMResult.reset(new ProfileRenderMapResult());
@@ -86,7 +86,7 @@
     string content = parser.SerializeToXML(pPRMResult.get(),version.get());
     ret = new MgByteReader(MgUtil::MultiByteToWideChar(content), MgMimeType::Xml);
 
-    MG_CATCH_AND_THROW(L"MgServerProfilingService.ProfileRenderMap")
+    MG_CATCH_AND_THROW(L"MgProfilingService::ProfileRenderMap")
 
     return ret.Detach();
 }
\ No newline at end of file

Modified: branches/2.4/MgDev/Desktop/MgDesktop/Services/RenderingService.cpp
===================================================================
--- branches/2.4/MgDev/Desktop/MgDesktop/Services/RenderingService.cpp	2012-05-21 14:24:06 UTC (rev 6673)
+++ branches/2.4/MgDev/Desktop/MgDesktop/Services/RenderingService.cpp	2012-05-21 15:41:13 UTC (rev 6674)
@@ -255,7 +255,7 @@
     MG_LOG_OPERATION_MESSAGE_ADD_INT32(themeCategory);
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
-    MG_LOG_TRACE_ENTRY(L"MgServerMappingService::GenerateLegendImage");
+    MG_LOG_TRACE_ENTRY(L"MgRenderingService::GenerateLegendImage()");
 
     if (0 == resource)
     {
@@ -410,7 +410,7 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == dwfVersion) ? L"MgDwfVersion" : dwfVersion->GetLogString());
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
-    MG_LOG_TRACE_ENTRY(L"MgServerMappingService::GeneratePlot()");
+    MG_LOG_TRACE_ENTRY(L"MgRenderingService::GeneratePlot()");
 
     if (NULL == map  || NULL == dwfVersion || NULL == plotSpec )
     {
@@ -481,7 +481,7 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == dwfVersion) ? L"MgDwfVersion" : dwfVersion->GetLogString());
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
-    MG_LOG_TRACE_ENTRY(L"MgServerMappingService::GeneratePlot()");
+    MG_LOG_TRACE_ENTRY(L"MgRenderingService::GeneratePlot()");
 
     if (NULL == map  || NULL == center || NULL == dwfVersion || NULL == plotSpec )
     {
@@ -552,7 +552,7 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == dwfVersion) ? L"MgDwfVersion" : dwfVersion->GetLogString());
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
-    MG_LOG_TRACE_ENTRY(L"MgServerMappingService::GeneratePlot()");
+    MG_LOG_TRACE_ENTRY(L"MgRenderingService::GeneratePlot()");
 
     if (NULL == map  || NULL == extents || NULL == plotSpec || NULL == dwfVersion )
     {
@@ -618,6 +618,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == dwfVersion) ? L"MgDwfVersion" : dwfVersion->GetLogString().c_str());
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgRenderingService::GenerateMultiPlot()");
+
     ret = GenerateMultiPlotInternal(mapPlots, dwfVersion);
 
     // Successful operation
@@ -644,7 +646,7 @@
 
     MG_SERVER_MAPPING_SERVICE_TRY()
 
-    MG_LOG_TRACE_ENTRY(L"MgServerMappingService::GenerateMultiPlot()");
+    MG_LOG_TRACE_ENTRY(L"MgRenderingService::GenerateMultiPlot()");
 
     if (0 == mapPlots || 0 == dwfVersion)
     {
@@ -1038,6 +1040,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_INT32(tileRow);
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgRenderingService::RenderTile()");
+
     if (NULL == map || baseMapLayerGroupName.empty())
         throw new MgNullArgumentException(L"MgRenderingService.RenderTile", __LINE__, __WFILE__, NULL, L"", NULL);
 
@@ -1204,6 +1208,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(format.c_str());
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgRenderingService::RenderDynamicOverlay()");
+
     // Call updated RenderDynamicOverlay API
     //ret = RenderDynamicOverlay(map, selection, format, true);
 
@@ -1254,6 +1260,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_BOOL(bKeepSelection);
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgRenderingService::RenderDynamicOverlay()");
+
     // Call updated RenderDynamicOverlay API
     MgRenderingOptions options(format, MgRenderingOptions::RenderSelection |
         MgRenderingOptions::RenderLayers | (bKeepSelection? MgRenderingOptions::KeepSelection : 0), NULL);
@@ -1300,6 +1308,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgRenderingOptions");
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgRenderingService::RenderDynamicOverlay()");
+
     // Call updated RenderDynamicOverlay API 
     ret = RenderDynamicOverlayInternal(map, selection, options, NULL);
 
@@ -1349,6 +1359,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"ProfileRenderMapResult");
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgRenderingService::RenderDynamicOverlay()");
+
     ret = RenderDynamicOverlayInternal(map, selection, options, pPRMResult);
 
     // Successful operation
@@ -1494,6 +1506,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(format.c_str());
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgRenderingService::RenderMap()");
+
     ret = RenderMapPublished(map, selection, format, true, false);
 
     // Successful operation
@@ -1540,6 +1554,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_BOOL(bKeepSelection);
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgRenderingService::RenderMap()");
+
     ret = RenderMapPublished(map, selection, format, bKeepSelection, false);
 
     // Successful operation
@@ -1591,6 +1607,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_BOOL(bClip);
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgRenderingService::RenderMap()");
+
     ret = RenderMapPublished(map, selection, format, bKeepSelection, bClip);
 
     // Successful operation
@@ -2079,7 +2097,7 @@
                                                   CREFSTRING format)
 {
     Ptr<MgByteReader> ret;
-    MG_LOG_OPERATION_MESSAGE(L"CopyResource");
+    MG_LOG_OPERATION_MESSAGE(L"RenderMapLegend");
 
     MG_TRY()
 
@@ -2097,6 +2115,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(format.c_str());
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgRenderingService::RenderMapLegend()");
+
     if (NULL == map || NULL == backgroundColor)
         throw new MgNullArgumentException(L"MgRenderingService.RenderMapLegend", __LINE__, __WFILE__, NULL, L"", NULL);
 

Modified: branches/2.4/MgDev/Desktop/MgDesktop/Services/ResourceService.cpp
===================================================================
--- branches/2.4/MgDev/Desktop/MgDesktop/Services/ResourceService.cpp	2012-05-21 14:24:06 UTC (rev 6673)
+++ branches/2.4/MgDev/Desktop/MgDesktop/Services/ResourceService.cpp	2012-05-21 15:41:13 UTC (rev 6674)
@@ -198,11 +198,13 @@
 
     MG_RESOURCE_SERVICE_TRY()
 
-    MG_LOG_OPERATION_MESSAGE_INIT(MG_API_VERSION(1,0,0),1);
+    MG_LOG_OPERATION_MESSAGE_INIT(MG_API_VERSION(1 ,0 ,0),1);
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgByteReader");
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdResourceService::ApplyResourcePackage()");
+
     packagePathname = MgFileUtil::GenerateTempFileName();
     MgByteSink byteSink(packageStream);
 
@@ -267,7 +269,7 @@
 
     MG_RESOURCE_SERVICE_TRY()
 
-    MG_LOG_OPERATION_MESSAGE_INIT(MG_API_VERSION(1,0,0),3);
+    MG_LOG_OPERATION_MESSAGE_INIT(MG_API_VERSION(1, 0, 0),3);
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
     MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == resource) ? L"MgResourceIdentifier" : resource->ToString().c_str());
     MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
@@ -276,6 +278,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgByteReader");
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdResourceService::SetResource()");
+
     CHECKARGUMENTNULL(resource, L"MgdResourceService::SetResource");
     //Only null check if not a folder, because otherwise this is a legit way of
     //creating a folder
@@ -333,6 +337,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == resource) ? L"MgResourceIdentifier" : resource->ToString().c_str());
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdResourceService::DeleteResource()");
+
     CHECKARGUMENTNULL(resource, L"MgdResourceService::DeleteResource");
     if (ResourceExists(resource))
     {
@@ -406,6 +412,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_BOOL(overwrite);
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdResourceService::CopyResource()");
+
     CHECKARGUMENTNULL(sourceResource, L"MgdResourceService::CopyResource");
     CHECKARGUMENTNULL(destResource, L"MgdResourceService::CopyResource");
 
@@ -505,6 +513,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_BOOL(overwrite);
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdResourceService::MoveResource()");
+
     MoveResource(sourceResource, destResource, overwrite, false);
 
     // Successful operation
@@ -541,6 +551,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_BOOL(cascade);
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdResourceService::MoveResource()");
+
     CHECKARGUMENTNULL(sourceResource, L"MgdResourceService::MoveResource");
     CHECKARGUMENTNULL(destResource, L"MgdResourceService::MoveResource");
 
@@ -655,6 +667,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgByteReader");
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdResourceService::SetResourceData()");
+
     CHECKARGUMENTNULL(resource, L"MgdResourceService::SetResourceData");
     CHECKARGUMENTNULL(data, L"MgdResourceService::SetResourceData");
 
@@ -700,6 +714,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(dataName.c_str());
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdResourceService::DeleteResourceData()");
+
     CHECKARGUMENTNULL(resource, L"MgdResourceService::DeleteResourceData");
 
     if (dataName.empty())
@@ -748,6 +764,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_BOOL(overwrite);
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdResourceService::RenameResourceData()");
+
     CHECKARGUMENTNULL(resource, L"MgdResourceService::RenameResourceData");
     if (!ResourceExists(resource))
     {
@@ -801,6 +819,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(dataName.c_str());
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdResourceService::GetResourceData()");
+
     STRING preProcessTags(L"");
     ret = GetResourceData(resource, dataName, preProcessTags);
 
@@ -1002,6 +1022,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(toDate.c_str());
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdResourceService::EnumerateResources()");
+
     ret = EnumerateResources(resource, depth, type, properties, fromDate, toDate, true);
 
     // Successful operation
@@ -1049,6 +1071,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_BOOL(computeChildren);
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdResourceService::EnumerateResources()");
+
     CHECKARGUMENTNULL(resource, L"MgdResourceService::EnumerateResources");
 
     //Disregard: properties, fromDate, toDate. 
@@ -1177,6 +1201,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == resource) ? L"MgResourceIdentifier" : resource->ToString().c_str());
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdResourceService::EnumerateResourceData()");
+
     CHECKARGUMENTNULL(resource, L"MgdResourceService::EnumerateResourceData");
 
     if (!ResourceExists(resource))
@@ -1257,6 +1283,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == resource) ? L"MgResourceIdentifier" : resource->ToString().c_str());
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdResourceService::ResourceExists()");
+
     CHECKARGUMENTNULL(resource, L"MgdResourceService::ResourceExists");
 
 	STRING path = ResolveContentPath(resource);
@@ -1300,6 +1328,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgStringCollection");
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdResourceService::GetResourceContents()");
+
     CHECKARGUMENTNULL(resources, L"MgdResourceService::GetResourceContents");
 
     contents = new MgStringCollection();
@@ -1348,6 +1378,8 @@
     MG_LOG_OPERATION_MESSAGE_ADD_STRING(preProcessTags);
     MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
 
+    MG_LOG_TRACE_ENTRY(L"MgdResourceService::GetResourceContent()");
+
 	CHECKARGUMENTNULL(resource, L"MgdResourceService::GetResourceContent");
     
     STRING resType = resource->GetResourceType();

Modified: branches/2.4/MgDev/Desktop/MgDesktop/Services/SqlReader.cpp
===================================================================
--- branches/2.4/MgDev/Desktop/MgDesktop/Services/SqlReader.cpp	2012-05-21 14:24:06 UTC (rev 6673)
+++ branches/2.4/MgDev/Desktop/MgDesktop/Services/SqlReader.cpp	2012-05-21 15:41:13 UTC (rev 6674)
@@ -623,7 +623,7 @@
             throw;
     }
 
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgServerDataReader.GetString");
+    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdSqlDataReader::GetString");
 
     return ((const wchar_t*)retVal);
 }

Modified: branches/2.4/MgDev/Desktop/MgDesktop/Services/TileService.cpp
===================================================================
--- branches/2.4/MgDev/Desktop/MgDesktop/Services/TileService.cpp	2012-05-21 14:24:06 UTC (rev 6673)
+++ branches/2.4/MgDev/Desktop/MgDesktop/Services/TileService.cpp	2012-05-21 15:41:13 UTC (rev 6674)
@@ -113,8 +113,23 @@
     FILE* lockFile = NULL;
     STRING tilePathname, lockPathname;
 
+    MG_LOG_OPERATION_MESSAGE(L"GetTile");
+
     MG_TRY()
 
+    MG_LOG_OPERATION_MESSAGE_INIT(MG_API_VERSION(1, 0, 0), 5);
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == mapDefinition) ? L"MgResourceIdentifier" : mapDefinition->ToString().c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(baseMapLayerGroupName.c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_INT32(tileColumn);
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_INT32(tileRow);
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_INT32(scaleIndex);
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
     if (NULL == mapDefinition || baseMapLayerGroupName.empty())
     {
         throw new MgNullArgumentException(L"MgTileService.GetTile",
@@ -239,13 +254,25 @@
         break;
     }
 
-    MG_CATCH(L"MgTileService.GetTile")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_CATCH(L"MgTileService::GetTile")
+
+    if (mgException != NULL)
+    {
+        // Failed operation
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Failure.c_str());
+    }
+
     if (NULL != lockFile)
     {
         MgFileUtil::DeleteFile(lockPathname, false);
     }
 
+    // Add access log entry for operation
+    MG_LOG_OPERATION_MESSAGE_ACCESS_ENTRY();
+
     MG_THROW()
 
     return ret.Detach();
@@ -255,16 +282,32 @@
 ///////////////////////////////////////////////////////////////////////////////
 // look for the tile in the tilecache first
 MgByteReader* MgTileService::GetTile(MgdMap* map,
-                                           CREFSTRING baseMapLayerGroupName,
-                                           INT32 tileColumn,
-                                           INT32 tileRow)
+                                     CREFSTRING baseMapLayerGroupName,
+                                     INT32 tileColumn,
+                                     INT32 tileRow)
 {
     Ptr<MgByteReader> ret;
     FILE* lockFile = NULL;
     STRING tilePathname, lockPathname;
 
+    MG_LOG_OPERATION_MESSAGE(L"GetTile");
+
     MG_TRY()
 
+    Ptr<MgResourceIdentifier> mapId;
+    if (NULL != map)
+        mapId = map->GetMapDefinition();
+    MG_LOG_OPERATION_MESSAGE_INIT(MG_API_VERSION(1, 0, 0), 4);
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == mapId) ? L"MgResourceIdentifier" : mapId->ToString().c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(baseMapLayerGroupName.c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_INT32(tileColumn);
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_INT32(tileRow);
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
     if (NULL == map || baseMapLayerGroupName.empty())
     {
         throw new MgNullArgumentException(L"MgTileService.GetTile",
@@ -345,13 +388,25 @@
         break;
     }
 
-    MG_CATCH(L"MgTileService.GetTile")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_CATCH(L"MgTileService::GetTile")
+
+    if (mgException != NULL)
+    {
+        // Failed operation
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Failure.c_str());
+    }
+
     if (NULL != lockFile)
     {
         MgFileUtil::DeleteFile(lockPathname, false);
     }
 
+    // Add access log entry for operation
+    MG_LOG_OPERATION_MESSAGE_ACCESS_ENTRY();
+
     MG_THROW()
 
     return ret.Detach();
@@ -497,17 +552,40 @@
 ///////////////////////////////////////////////////////////////////////////////
 void MgTileService::ClearCache(MgdMap* map)
 {
+    MG_LOG_OPERATION_MESSAGE(L"ClearCache");
+
     MG_TRY()
 
+    Ptr<MgResourceIdentifier> resourceId;
+    if (NULL != map)
+        resourceId = map->GetMapDefinition();
+    MG_LOG_OPERATION_MESSAGE_INIT(MG_API_VERSION(1, 0, 0), 1);
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == resourceId) ? L"MgResourceIdentifier" : resourceId->ToString().c_str());
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
     if (NULL == map)
         throw new MgNullArgumentException(L"MgTileService.ClearCache", __LINE__, __WFILE__, NULL, L"", NULL);
 
-    Ptr<MgResourceIdentifier> resourceId = map->GetMapDefinition();
     ClearMapCache(resourceId->ToString());
 
     m_tileCache->Clear(map);
 
-    MG_CATCH_AND_THROW(L"MgTileService.ClearCache")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_CATCH(L"MgTileService::ClearCache")
+
+    if (mgException != NULL)
+    {
+        // Failed operation
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Failure.c_str());
+    }
+
+    // Add access log entry for operation
+    MG_LOG_OPERATION_MESSAGE_ACCESS_ENTRY();
+
+    MG_THROW()
 }
 
 
@@ -619,12 +697,65 @@
 ///////////////////////////////////////////////////////////////////////////////
 INT32 MgTileService::GetDefaultTileSizeX()
 {
-    return MgTileParameters::tileWidth;
+    INT32 ret = 0;
+    MG_LOG_OPERATION_MESSAGE(L"GetDefaultTileSizeX");
+
+    MG_TRY()
+
+    MG_LOG_OPERATION_MESSAGE_INIT(MG_API_VERSION(1, 0, 0), 0);
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+    
+    ret = MgTileParameters::tileWidth;
+
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_CATCH(L"MgTileService::GetDefaultTileSizeX")
+
+    if (mgException != NULL)
+    {
+        // Failed operation
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Failure.c_str());
+    }
+
+    // Add access log entry for operation
+    MG_LOG_OPERATION_MESSAGE_ACCESS_ENTRY();
+
+    MG_THROW()
+    return 0;
 }
 
 
 ///////////////////////////////////////////////////////////////////////////////
 INT32 MgTileService::GetDefaultTileSizeY()
 {
-    return MgTileParameters::tileHeight;
+    INT32 ret = 0;
+    MG_LOG_OPERATION_MESSAGE(L"GetDefaultTileSizeY");
+
+    MG_TRY()
+
+    MG_LOG_OPERATION_MESSAGE_INIT(MG_API_VERSION(1, 0, 0), 0);
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
+    ret = MgTileParameters::tileHeight;
+
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_CATCH(L"MgTileService::GetDefaultTileSizeY")
+
+    if (mgException != NULL)
+    {
+        // Failed operation
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Failure.c_str());
+    }
+
+    // Add access log entry for operation
+    MG_LOG_OPERATION_MESSAGE_ACCESS_ENTRY();
+
+    MG_THROW()
+
+    return ret;
 }

Modified: branches/2.4/MgDev/Desktop/MgDesktop/System/PlatformInit.cpp
===================================================================
--- branches/2.4/MgDev/Desktop/MgDesktop/System/PlatformInit.cpp	2012-05-21 14:24:06 UTC (rev 6673)
+++ branches/2.4/MgDev/Desktop/MgDesktop/System/PlatformInit.cpp	2012-05-21 15:41:13 UTC (rev 6674)
@@ -163,11 +163,14 @@
     // Initialize Stylizer callback mechanism for non-fatal FDO exceptions
     MgMappingUtil::InitializeStylizerCallback();
 
+    MG_LOG_TRACE_ENTRY(L"MgPlatform::Initialize()");
+
     sm_init = true;
 }
 
 void MgPlatform::Terminate()
 {
+    MG_LOG_TRACE_ENTRY(L"MgPlatform::Terminate()");
     MG_TRY()
 
     MgFdoConnectionPool::Cleanup();

Modified: branches/2.4/MgDev/Desktop/UnitTest/main.cpp
===================================================================
--- branches/2.4/MgDev/Desktop/UnitTest/main.cpp	2012-05-21 14:24:06 UTC (rev 6673)
+++ branches/2.4/MgDev/Desktop/UnitTest/main.cpp	2012-05-21 15:41:13 UTC (rev 6674)
@@ -57,6 +57,8 @@
     CppUnit::TextUi::TestRunner runner;
 
     // Add all of the tests
+    //NOTE: Leave trace log off, otherwise one of the tests here will fail
+    runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestLogManager").makeTest());
 #ifdef _DEBUG
     ACE_DEBUG((LM_INFO, ACE_TEXT(">>>>> Running all unit tests - Excluding Performance and CoordinateSystem. <<<<<\n\n")));
 #else
@@ -72,8 +74,6 @@
     //to verify functionality, but don't use VLD for memory leak detection. Seek an alternate tool/library
     //in this case.
     runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestTileService").makeTest());
-    
-    runner.addTest(CppUnit::TestFactoryRegistry::getRegistry("TestLogManager").makeTest());
 
     STRING fileName = L"UnitTestResults.xml";
     if (fileName.size() > 0)



More information about the mapguide-commits mailing list