[mapguide-commits] r6672 - branches/2.4/MgDev/Desktop/MgDesktop/Services

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon May 21 09:13:44 EDT 2012


Author: jng
Date: 2012-05-21 06:13:43 -0700 (Mon, 21 May 2012)
New Revision: 6672

Modified:
   branches/2.4/MgDev/Desktop/MgDesktop/Services/FeatureService.cpp
Log:
mg-desktop logging enhancement part 2: Log public API access to MgFeatureService

Modified: branches/2.4/MgDev/Desktop/MgDesktop/Services/FeatureService.cpp
===================================================================
--- branches/2.4/MgDev/Desktop/MgDesktop/Services/FeatureService.cpp	2012-05-21 11:47:54 UTC (rev 6671)
+++ branches/2.4/MgDev/Desktop/MgDesktop/Services/FeatureService.cpp	2012-05-21 13:13:43 UTC (rev 6672)
@@ -229,9 +229,15 @@
 MgByteReader* MgdFeatureService::GetFeatureProviders() 
 { 
     Ptr<MgByteReader> reader;
-    
+
+    MG_LOG_OPERATION_MESSAGE(L"GetFeatureProviders");
+
     MG_FEATURE_SERVICE_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();
+
     STRING xml = L"<FeatureProviderRegistry>\n";
 
     FdoPtr<IProviderRegistry> reg = FdoFeatureAccessManager::GetProviderRegistry();
@@ -374,8 +380,22 @@
     source->SetMimeType(MgMimeType::Xml);
     reader = source->GetReader();
 
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdFeatureService::GetFeatureProviders")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::GetFeatureProviders")
+
+    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_FEATURE_SERVICE_THROW()
+
 	return reader.Detach();
 }
 
@@ -383,16 +403,26 @@
                                                         CREFSTRING propertyName,
                                                         CREFSTRING partialConnString) 
 { 
+    Ptr<MgStringCollection> values;
+    MG_LOG_OPERATION_MESSAGE(L"GetConnectionPropertyValues");
+
+    MG_FEATURE_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(providerName.c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(propertyName.c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(partialConnString.c_str());
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
     if (providerName.empty())
         throw new MgInvalidArgumentException(L"MgdFeatureService::GetConnectionPropertyValues", __LINE__, __WFILE__, NULL, L"", NULL);
 
     if (propertyName.empty())
         throw new MgInvalidArgumentException(L"MgdFeatureService::GetConnectionPropertyValues", __LINE__, __WFILE__, NULL, L"", NULL);
 
-    Ptr<MgStringCollection> values;
-
-    MG_FEATURE_SERVICE_TRY()
-
     Ptr<MgFeatureConnection> connWrapper = new MgFeatureConnection(providerName, partialConnString);
     {
         FdoPtr<FdoIConnection> conn = connWrapper->GetConnection();
@@ -410,8 +440,23 @@
             values->Add(val);
         }
     }
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdFeatureService::GetConnectionPropertyValues")
 
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::GetConnectionPropertyValues")
+
+    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_FEATURE_SERVICE_THROW()
+
 	return values.Detach();
 }
 
@@ -419,29 +464,73 @@
 {
 	bool ok = false;
 
+    MG_LOG_OPERATION_MESSAGE(L"TestConnection");
+
     MG_FEATURE_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(providerName.c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(connectionString.c_str());
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
 	Ptr<MgFeatureConnection> conn = new MgFeatureConnection(providerName, connectionString);
     ok = conn->IsConnectionOpen();
 
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdFeatureService::TestConnection")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::TestConnection")
+
+    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_FEATURE_SERVICE_THROW()
+
 	return ok;
 }
 
 bool MgdFeatureService::TestConnection(MgResourceIdentifier* resource) 
-{ 
-    CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::TestConnection");
+{
+    bool ok = false;
 
-	bool ok = false;
+    MG_LOG_OPERATION_MESSAGE(L"TestConnection");
 
-	MG_FEATURE_SERVICE_TRY()
+    MG_FEATURE_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();
+
+    CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::TestConnection");
+
 	Ptr<MgFeatureConnection> conn = new MgFeatureConnection(resource);
 	ok = conn->IsConnectionOpen();
 
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdFeatureService::TestConnection")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::TestConnection")
+
+    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_FEATURE_SERVICE_THROW()
+
 	return ok;
 }
 
@@ -1031,24 +1120,54 @@
 {
     Ptr<MgByteReader> ret;
     
+    MG_LOG_OPERATION_MESSAGE(L"GetCapabilities");
+
     MG_FEATURE_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(providerName.c_str());
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
 	ret = GetCapabilities(providerName, L"");
 
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdFeatureService::GetCapabilities")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::GetCapabilities")
+
+    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_FEATURE_SERVICE_THROW()
+
     return ret.Detach();
 }
 
 MgByteReader* MgdFeatureService::GetCapabilities(CREFSTRING providerName, CREFSTRING connectionString) 
-{ 
-    if (providerName.empty())
-        throw new MgInvalidArgumentException(L"MgdFeatureService::GetCapabilities", __LINE__, __WFILE__, NULL, L"", NULL);
-
+{
     Ptr<MgByteReader> caps;
 
+    MG_LOG_OPERATION_MESSAGE(L"GetCapabilities");
+
     MG_FEATURE_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(providerName.c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(connectionString.c_str());
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
+    if (providerName.empty())
+        throw new MgInvalidArgumentException(L"MgdFeatureService::GetCapabilities", __LINE__, __WFILE__, NULL, L"", NULL);
+
     Ptr<MgFeatureConnection> connWrap = new MgFeatureConnection(providerName, connectionString);
     {
         FdoPtr<FdoIConnection> conn = connWrap->GetConnection();
@@ -1083,18 +1202,42 @@
 
         caps = xml->ToReader();
     }
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdFeatureService::GetCapabilities")
+    
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::GetCapabilities")
+
+    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_FEATURE_SERVICE_THROW()
+
 	return caps.Detach();
 }
 
 void MgdFeatureService::ApplySchema(MgResourceIdentifier* resource, MgFeatureSchema* schema) 
 { 
+    MG_LOG_OPERATION_MESSAGE(L"ApplySchema");
+
+    MG_FEATURE_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(L"MgFeatureSchema");
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
     CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::ApplySchema");
     CHECKARGUMENTNULL(schema, L"MgdFeatureService::ApplySchema");
 
-	MG_FEATURE_SERVICE_TRY()
-
     // Connect to provider
     Ptr<MgFeatureConnection> connWrap = new MgFeatureConnection(resource);
     {
@@ -1156,7 +1299,21 @@
             cache->RemoveEntry(resource);
         }
     }
-    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH_AND_THROW(resource, L"MgdFeatureService::ApplySchema")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH(resource, L"MgdFeatureService::ApplySchema")
+
+    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_FEATURE_SERVICE_THROW()
 }
 
 MgFeatureSchemaCollection* MgdFeatureService::DescribeSchema(MgResourceIdentifier* resource,
@@ -1165,12 +1322,37 @@
 {
     Ptr<MgFeatureSchemaCollection> ret;
 
+    MG_LOG_OPERATION_MESSAGE(L"DescribeSchema");
+
     MG_FEATURE_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(schemaName.c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == classNames) ? L"MgStringCollection" : classNames->GetLogString().c_str());
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
     ret = DescribeSchema(resource, schemaName, classNames, true);
 
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdFeatureService::DescribeSchema")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::DescribeSchema")
+
+    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_FEATURE_SERVICE_THROW()
+
     return ret.Detach();
 }
 
@@ -1738,22 +1920,59 @@
                                                              CREFSTRING schemaName) 
 { 
     Ptr<MgFeatureSchemaCollection> ret;
+    MG_LOG_OPERATION_MESSAGE(L"DescribeSchema");
+
     MG_FEATURE_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(schemaName.c_str());
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
 	ret = DescribeSchema(resource, schemaName, NULL);
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdFeatureService::DescribeSchema")
+    
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::DescribeSchema")
+
+    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_FEATURE_SERVICE_THROW()
+
     return ret.Detach();
 }
 
 STRING MgdFeatureService::DescribeSchemaAsXml(MgResourceIdentifier* resource,
                                               CREFSTRING schemaName,
                                               MgStringCollection* classNames) 
-{ 
-	CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::DescribeSchemaAsXml");
-
+{
     STRING schemaXml;
 
+    MG_LOG_OPERATION_MESSAGE(L"DescribeSchemaAsXml");
+
     MG_FEATURE_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(schemaName.c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == classNames) ? L"MgStringCollection" : classNames->GetLogString().c_str());
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
+	CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::DescribeSchemaAsXml");
+
     MgFeatureServiceCache* cache = MgFeatureServiceCache::GetInstance();
     schemaXml = cache->GetSchemaXml(resource, schemaName, classNames);
 
@@ -1803,8 +2022,22 @@
         //cache->CheckPermission(resource, MgResourcePermission::ReadOnly);
     }
 
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdFeatureService::DescribeSchemaAsXml")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::DescribeSchemaAsXml")
+
+    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_FEATURE_SERVICE_THROW()
+
     return schemaXml;
 }
 
@@ -1812,9 +2045,35 @@
                                               CREFSTRING schemaName) 
 { 
     STRING ret;
+    MG_LOG_OPERATION_MESSAGE(L"DescribeSchemaAsXml");
+
     MG_FEATURE_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(schemaName.c_str());
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
 	ret = DescribeSchemaAsXml(resource, schemaName, NULL);
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdFeatureService::DescribeSchemaAsXml")
+    
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::DescribeSchemaAsXml")
+
+    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_FEATURE_SERVICE_THROW()
+
     return ret;
 }
 
@@ -1916,11 +2175,18 @@
 
 STRING MgdFeatureService::SchemaToXml(MgFeatureSchemaCollection* schemas) 
 { 
-    CHECKARGUMENTNULL(schemas, L"MgdFeatureService::SchemaToXml");
     STRING serializedXml;
+    MG_LOG_OPERATION_MESSAGE(L"SchemaToXml");
 
     MG_FEATURE_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(L"MgFeatureSchemaCollection");
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
+    CHECKARGUMENTNULL(schemas, L"MgdFeatureService::SchemaToXml");
+
     FdoPtr<FdoFeatureSchemaCollection> fdoSchemaCol = MgFeatureUtil::GetFdoFeatureSchemaCollection(schemas);
     CHECKNULL(fdoSchemaCol, L"MgdFeatureService::SchemaToXml");
 
@@ -1946,8 +2212,22 @@
 
     delete [] bytes;
 
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdFeatureService::SchemaToXml")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::SchemaToXml")
+
+    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_FEATURE_SERVICE_THROW()
+
     return serializedXml;
 }
 
@@ -1955,7 +2235,15 @@
 { 
 	Ptr<MgFeatureSchemaCollection> mgSchemaCol;
 
+    MG_LOG_OPERATION_MESSAGE(L"XmlToSchema");
+
     MG_FEATURE_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(L"STRING");
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
     mgSchemaCol = new MgFeatureSchemaCollection();
 
     string mbString = MgUtil::WideCharToMultiByte(xml);
@@ -2007,8 +2295,22 @@
         mgSchemaCol->Add(mgSchema);
     }
 
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdFeatureService::XmlToSchema")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::XmlToSchema")
+
+    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_FEATURE_SERVICE_THROW()
+
     return mgSchemaCol.Detach();
 }
 
@@ -2017,9 +2319,38 @@
                                                    MgFeatureQueryOptions* options) 
 { 
     Ptr<MgFeatureReader> ret;
+
+    MG_LOG_OPERATION_MESSAGE(L"SelectFeatures");
+
     MG_FEATURE_SERVICE_TRY()
-	ret = SelectFeatures(resource, className, options, L"");
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdFeatureService::SelectFeatures")
+
+    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(className.c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgFeatureQueryOptions");
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
+    ret = SelectFeaturesInternal(resource, className, options, L"", false, false);
+
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::SelectFeatures")
+
+    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_FEATURE_SERVICE_THROW()
+
     return ret.Detach();
 }
 
@@ -2029,9 +2360,39 @@
                                                    CREFSTRING coordinateSystem) 
 { 
     Ptr<MgFeatureReader> ret;
+    MG_LOG_OPERATION_MESSAGE(L"SelectFeatures");
+
     MG_FEATURE_SERVICE_TRY()
+
+    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 == resource) ? L"MgResourceIdentifier" : resource->ToString().c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(className.c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgFeatureQueryOptions");
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"STRING");
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
 	ret = SelectFeaturesInternal(resource, className, options, coordinateSystem, false, false);
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdFeatureService::SelectFeatures")
+    
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::SelectFeatures")
+
+    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_FEATURE_SERVICE_THROW()
+
     return ret.Detach();
 }
 
@@ -2040,9 +2401,37 @@
                                                                       MgFeatureQueryOptions* options)
 {
     Ptr<MgdScrollableFeatureReader> ret;
+    MG_LOG_OPERATION_MESSAGE(L"SelectFeaturesExtended");
+
     MG_FEATURE_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(className.c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgFeatureQueryOptions");
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
     ret = static_cast<MgdScrollableFeatureReader*>(SelectFeaturesInternal(resource, className, options, L"", false, true));
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdFeatureService::SelectFeaturesExtended")
+    
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::SelectFeaturesExtended")
+
+    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_FEATURE_SERVICE_THROW()
+
     return ret.Detach();
 }
 
@@ -3271,14 +3660,25 @@
                                                  CREFSTRING className,
                                                  MgFeatureAggregateOptions* options) 
 { 
+    Ptr<MgDataReader> reader;
+    MG_LOG_OPERATION_MESSAGE(L"SelectAggregate");
+
+    MG_FEATURE_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(className.c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgFeatureAggregateOptions");
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
 	CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::SelectAggregate");
 	CHECKARGUMENTNULL(options, L"MgdFeatureService::SelectAggregate");
     if (className.empty())
         throw new MgInvalidArgumentException(L"MgdFeatureService::SelectAggregate", __LINE__, __WFILE__, NULL, L"", NULL);
 
-    Ptr<MgDataReader> reader;
-    MG_FEATURE_SERVICE_TRY()
-
     Ptr<MgFeatureConnection> connWrap = new MgFeatureConnection(resource);
     {
         FdoPtr<FdoIConnection> conn = connWrap->GetConnection();
@@ -3407,8 +3807,22 @@
 		}
     }
 
-    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH_AND_THROW(resource, L"MgdFeatureService::SelectAggregate")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH(resource, L"MgdFeatureService::SelectAggregate")
+
+    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_FEATURE_SERVICE_THROW()
+
 	return reader.Detach();
 }
 
@@ -3470,13 +3884,23 @@
                                                         MgFeatureCommandCollection* commands,
                                                         bool useTransaction) 
 { 
-	CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::UpdateFeatures");
-    CHECKARGUMENTNULL(commands, L"MgdFeatureService::UpdateFeatures");
-
     Ptr<MgPropertyCollection> result;
+    MG_LOG_OPERATION_MESSAGE(L"UpdateFeatures");
 
     MG_FEATURE_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(L"MgFeatureCommandCollection");
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_BOOL(useTransaction);
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
+	CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::UpdateFeatures");
+    CHECKARGUMENTNULL(commands, L"MgdFeatureService::UpdateFeatures");
+
     Ptr<MgTransaction> trans;
     if (useTransaction)
     {
@@ -3489,8 +3913,22 @@
         trans->Commit();
     }
 
-    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH_AND_THROW(resource, L"MgdFeatureService::UpdateFeatures")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH(resource, L"MgdFeatureService::UpdateFeatures")
+
+    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_FEATURE_SERVICE_THROW()
+
     return result.Detach();
 }
 
@@ -3498,13 +3936,23 @@
                                                         MgFeatureCommandCollection* commands,
                                                         MgTransaction* transaction) 
 { 
-	CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::UpdateFeatures");
-    CHECKARGUMENTNULL(commands, L"MgdFeatureService::UpdateFeatures");
-    
     Ptr<MgPropertyCollection> ret;
+    MG_LOG_OPERATION_MESSAGE(L"UpdateFeatures");
 
     MG_FEATURE_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(L"MgFeatureCommandCollection");
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgTransaction");
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
+	CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::UpdateFeatures");
+    CHECKARGUMENTNULL(commands, L"MgdFeatureService::UpdateFeatures");
+
     Ptr<MgFeatureConnection> connWrap;
 	FdoPtr<FdoIConnection> conn;
     Ptr<MgdTransaction> mgTrans = dynamic_cast<MgdTransaction*>(transaction);
@@ -3644,31 +4092,85 @@
         }
     }
 
-    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH_AND_THROW(resource, L"MgdFeatureService::UpdateFeatures")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH(resource, L"MgdFeatureService::UpdateFeatures")
+
+    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_FEATURE_SERVICE_THROW()
+
     return ret.Detach();
 }
 
 MgFeatureReader* MgdFeatureService::InsertFeatures(MgResourceIdentifier* resource, CREFSTRING className, MgPropertyCollection* propertyValues)
 {
     Ptr<MgFeatureReader> ret;
+    MG_LOG_OPERATION_MESSAGE(L"InsertFeatures");
+
     MG_FEATURE_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(className.c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgPropertyCollection");
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
 	ret = InsertFeatures(resource, className, propertyValues, NULL);
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdFeatureService::InsertFeatures")
+
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::InsertFeatures")
+
+    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_FEATURE_SERVICE_THROW()
+
     return ret.Detach();
 }
 
 MgFeatureReader* MgdFeatureService::InsertFeatures(MgResourceIdentifier* resource, CREFSTRING className, MgPropertyCollection* propertyValues, MgTransaction* trans)
 {
+    Ptr<MgFeatureReader> reader;
+    MG_LOG_OPERATION_MESSAGE(L"InsertFeatures");
+
+    MG_FEATURE_SERVICE_TRY()
+
+    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 == resource) ? L"MgResourceIdentifier" : resource->ToString().c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(className.c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgPropertyCollection");
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgTransaction");
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
     CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::InsertFeatures");
 	CHECKARGUMENTNULL(propertyValues, L"MgdFeatureService::InsertFeatures");
 	if (className.empty())
 		throw new MgNullArgumentException(L"MgdFeatureService::InsertFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
 	
-	Ptr<MgFeatureReader> reader;
-
-    MG_FEATURE_SERVICE_TRY()
-	
     Ptr<MgFeatureConnection> connWrap;
 	FdoPtr<FdoIConnection> conn;
     FdoPtr<FdoITransaction> fdoTrans;
@@ -3710,29 +4212,84 @@
 
 	reader = new MgdFeatureReader(connWrap, insertRes);
 
-    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH_AND_THROW(resource, L"MgdFeatureService::InsertFeatures")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH(resource, L"MgdFeatureService::InsertFeatures")
+
+    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_FEATURE_SERVICE_THROW()
+
 	return reader.Detach();
 }
 
 MgPropertyCollection* MgdFeatureService::InsertFeatures(MgResourceIdentifier* resource, CREFSTRING className, MgBatchPropertyCollection* batchPropertyValues)
 {
     Ptr<MgPropertyCollection> ret;
+    MG_LOG_OPERATION_MESSAGE(L"InsertFeatures");
+
     MG_FEATURE_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(className.c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgBatchPropertyCollection");
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
     ret = InsertFeatures(resource, className, batchPropertyValues, NULL);
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdFeatureService::InsertFeatures")
+    
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::InsertFeatures")
+
+    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_FEATURE_SERVICE_THROW()
     return ret.Detach();
 }
 
 MgPropertyCollection* MgdFeatureService::InsertFeatures(MgResourceIdentifier* resource, CREFSTRING className, MgBatchPropertyCollection* batchPropertyValues, MgTransaction* trans)
 {
+    Ptr<MgPropertyCollection> ret;
+    MG_LOG_OPERATION_MESSAGE(L"InsertFeatures");
+
+    MG_FEATURE_SERVICE_TRY()
+
+    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 == resource) ? L"MgResourceIdentifier" : resource->ToString().c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(className.c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgBatchPropertyCollection");
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgTransaction");
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
     CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::InsertFeatures");
 	CHECKARGUMENTNULL(batchPropertyValues, L"MgdFeatureService::InsertFeatures");
 	if (className.empty())
 		throw new MgNullArgumentException(L"MgdFeatureService::InsertFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
 	
-    Ptr<MgPropertyCollection> ret;
-    MG_FEATURE_SERVICE_TRY()
     ret = new MgPropertyCollection();
 
     Ptr<MgFeatureConnection> connWrap;
@@ -3826,30 +4383,87 @@
         ret->Add(fp);
     }
 
-    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH_AND_THROW(resource, L"MgdFeatureService::InsertFeatures")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH(resource, L"MgdFeatureService::InsertFeatures")
+
+    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_FEATURE_SERVICE_THROW()
     return ret.Detach();
 }
 
 int MgdFeatureService::UpdateFeatures(MgResourceIdentifier* resource, CREFSTRING className, MgPropertyCollection* propertyValues, CREFSTRING filter)
 {
     int ret = 0;
+    MG_LOG_OPERATION_MESSAGE(L"UpdateFeatures");
+
     MG_FEATURE_SERVICE_TRY()
+
+    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 == resource) ? L"MgResourceIdentifier" : resource->ToString().c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(className.c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgPropertyCollection");
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"STRING");
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
 	ret = UpdateFeatures(resource, className, propertyValues, filter, NULL);
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdFeatureService::UpdateFeatures")
+    
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::UpdateFeatures")
+
+    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_FEATURE_SERVICE_THROW()
     return ret;
 }
 
 int MgdFeatureService::UpdateFeatures(MgResourceIdentifier* resource, CREFSTRING className, MgPropertyCollection* propertyValues, CREFSTRING filter, MgTransaction* trans)
 {
+    int updated = 0;
+    MG_LOG_OPERATION_MESSAGE(L"UpdateFeatures");
+
+    MG_FEATURE_SERVICE_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 == resource) ? L"MgResourceIdentifier" : resource->ToString().c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(className.c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgPropertyCollection");
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"STRING");
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgTransaction");
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
     CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::UpdateFeatures");
 	CHECKARGUMENTNULL(propertyValues, L"MgdFeatureService::UpdateFeatures");
 	if (className.empty())
 		throw new MgNullArgumentException(L"MgdFeatureService::UpdateFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
 
-	int updated = 0;
-
-    MG_FEATURE_SERVICE_TRY()
-
     Ptr<MgFeatureConnection> connWrap;
 	FdoPtr<FdoIConnection> conn;
     FdoPtr<FdoITransaction> fdoTrans;
@@ -3891,30 +4505,83 @@
 
 	updated = update->Execute();
 
-    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH_AND_THROW(resource, L"MgdFeatureService::UpdateFeatures")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH(resource, L"MgdFeatureService::UpdateFeatures")
+
+    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_FEATURE_SERVICE_THROW()
+
 	return updated;
 }
 
 int MgdFeatureService::DeleteFeatures(MgResourceIdentifier* resource, CREFSTRING className, CREFSTRING filter)
 {
     int ret = 0;
+    MG_LOG_OPERATION_MESSAGE(L"DeleteFeatures");
+
     MG_FEATURE_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(className.c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"STRING");
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
 	ret = DeleteFeatures(resource, className, filter, NULL);
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdFeatureService::DeleteFeatures")
+    
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::DeleteFeatures")
+
+    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_FEATURE_SERVICE_THROW()
     return ret;
 }
 
 int MgdFeatureService::DeleteFeatures(MgResourceIdentifier* resource, CREFSTRING className, CREFSTRING filter, MgTransaction* trans)
 {
+    int deleted = 0;
+    MG_LOG_OPERATION_MESSAGE(L"DeleteFeatures");
+
+    MG_FEATURE_SERVICE_TRY()
+
+    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 == resource) ? L"MgResourceIdentifier" : resource->ToString().c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(className.c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"STRING");
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgTransaction");
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
     CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::DeleteFeatures");
 	if (className.empty())
 		throw new MgNullArgumentException(L"MgdFeatureService::DeleteFeatures", __LINE__, __WFILE__, NULL, L"", NULL);
 
-    int deleted = 0;
-
-    MG_FEATURE_SERVICE_TRY()
-
     Ptr<MgFeatureConnection> connWrap;
 	FdoPtr<FdoIConnection> conn;
     FdoPtr<FdoITransaction> fdoTrans;
@@ -3947,18 +4614,55 @@
 
 	deleted = fdoDelete->Execute();
 
-    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH_AND_THROW(resource, L"MgdFeatureService::DeleteFeatures")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH(resource, L"MgdFeatureService::DeleteFeatures")
+
+    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_FEATURE_SERVICE_THROW()
+
 	return deleted;
 }
 
 void MgdFeatureService::PurgeCache(MgResourceIdentifier* resource)
 {
+    MG_LOG_OPERATION_MESSAGE(L"PurgeCache");
+
     MG_FEATURE_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();
+
     MgFeatureServiceCache* cache = MgFeatureServiceCache::GetInstance();
     cache->RemoveEntry(resource);
     MgFdoConnectionPool::PurgeCachedConnections(resource);
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdFeatureService::PurgeCache")
+
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::PurgeCache")
+
+    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_FEATURE_SERVICE_THROW()
 }
 
 MgFeatureReader* MgdFeatureService::GetLockedFeatures(MgResourceIdentifier* resource,
@@ -3966,38 +4670,94 @@
                                                       MgFeatureQueryOptions* options) 
 { 
     Ptr<MgFeatureReader> ret;
+    MG_LOG_OPERATION_MESSAGE(L"GetLockedFeatures");
+
     MG_FEATURE_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(className.c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgFeatureQueryOptions");
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
 	ret = SelectFeaturesInternal(resource, className, options, L"", true, false);
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdFeatureService::GetLockedFeatures")
+
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::GetLockedFeatures")
+
+    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_FEATURE_SERVICE_THROW()
+
     return ret.Detach();
 }
 
 MgTransaction* MgdFeatureService::BeginTransaction(MgResourceIdentifier* resource) 
 { 
-	CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::BeginTransaction");
-
     Ptr<MgTransaction> trans;
+    MG_LOG_OPERATION_MESSAGE(L"BeginTransaction");
 
     MG_FEATURE_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();
+
+	CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::BeginTransaction");
+
     Ptr<MgFeatureConnection> conn = new MgFeatureConnection(resource);
     trans = new MgdTransaction(conn, resource);
 
-    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH_AND_THROW(resource, L"MgdFeatureService::BeginTransaction")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH(resource, L"MgdFeatureService::BeginTransaction")
+
+    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_FEATURE_SERVICE_THROW()
+
     return trans.Detach();
 }
 
-MgSqlDataReader* MgdFeatureService::ExecuteSqlQuery(MgResourceIdentifier* resource,
-                                         CREFSTRING sqlStatement) 
-{ 
+MgSqlDataReader* MgdFeatureService::ExecuteSqlQuery(MgResourceIdentifier* resource, CREFSTRING sqlStatement) 
+{
+    Ptr<MgSqlDataReader> reader;
+    MG_LOG_OPERATION_MESSAGE(L"ExecuteSqlQuery");
+
+    MG_FEATURE_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(sqlStatement.c_str());
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
 	CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::ExecuteSqlQuery");
     if (sqlStatement.empty())
         throw new MgInvalidArgumentException(L"MgdFeatureService::ExecuteSqlQuery", __LINE__, __WFILE__, NULL, L"", NULL);
 
-    Ptr<MgSqlDataReader> reader;
-    MG_FEATURE_SERVICE_TRY()
-
 	Ptr<MgFeatureConnection> connWrap = new MgFeatureConnection(resource);
     FdoPtr<FdoIConnection> conn = connWrap->GetConnection();
 
@@ -4007,8 +4767,22 @@
 	FdoPtr<FdoISQLDataReader> fdoReader = sql->ExecuteReader();
 	reader = new MgdSqlDataReader(connWrap, fdoReader);
 
-    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH_AND_THROW(resource, L"MgdFeatureService::ExecuteSqlQuery")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH(resource, L"MgdFeatureService::ExecuteSqlQuery")
+
+    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_FEATURE_SERVICE_THROW()
+
 	return reader.Detach();
 }
 
@@ -4018,9 +4792,38 @@
                                                     MgTransaction* trans) 
 {
     Ptr<MgSqlDataReader> ret;
+    MG_LOG_OPERATION_MESSAGE(L"ExecuteSqlQuery");
+
     MG_FEATURE_SERVICE_TRY()
+
+    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 == resource) ? L"MgResourceIdentifier" : resource->ToString().c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(sqlStatement.c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgParameterCollection");
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgTransaction");
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
     ret = ExecuteSqlQuery(resource, sqlStatement, params, trans, m_nDataCacheSize);
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdFeatureService::ExecuteSqlQuery")
+
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::ExecuteSqlQuery")
+
+    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_FEATURE_SERVICE_THROW()
     return ret.Detach();
 }
 
@@ -4100,8 +4903,21 @@
                                             MgTransaction* trans)
 { 
     INT32 ret = 0;
+    MG_LOG_OPERATION_MESSAGE(L"ExecuteSqlNonQuery");
+
     MG_FEATURE_SERVICE_TRY()
 
+    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 == resource) ? L"MgResourceIdentifier" : resource->ToString().c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(sqlNonSelectStatement.c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgParameterCollection");
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgTransaction");
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
     CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::ExecuteSqlNonQuery");
     if (sqlNonSelectStatement.empty())
         throw new MgInvalidArgumentException(L"MgdFeatureService::ExecuteSqlNonQuery", __LINE__, __WFILE__, NULL, L"", NULL);
@@ -4153,21 +4969,43 @@
     if (NULL != params && params->GetCount() > 0)
         MgFeatureUtil::UpdateParameterCollection(fdoParams, params);
 
-    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH_AND_THROW(resource, L"MgdFeatureService::ExecuteSqlNonQuery")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH(resource, L"MgdFeatureService::ExecuteSqlNonQuery")
+
+    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_FEATURE_SERVICE_THROW()
     return ret;
 }
 
 INT32 MgdFeatureService::ExecuteSqlNonQuery(MgResourceIdentifier* resource,
                                             CREFSTRING sqlNonSelectStatement) 
 { 
+    INT32 ret = 0;
+    MG_LOG_OPERATION_MESSAGE(L"ExecuteSqlNonQuery");
+
+    MG_FEATURE_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(sqlNonSelectStatement.c_str());
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
 	CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::ExecuteSqlNonQuery");
     if (sqlNonSelectStatement.empty())
         throw new MgInvalidArgumentException(L"MgdFeatureService::ExecuteSqlNonQuery", __LINE__, __WFILE__, NULL, L"", NULL);
 
-    INT32 ret = 0;
-
-    MG_FEATURE_SERVICE_TRY()
-
     Ptr<MgFeatureConnection> connWrap = new MgFeatureConnection(resource);
 	FdoPtr<FdoIConnection> conn = connWrap->GetConnection();
 
@@ -4176,18 +5014,41 @@
 
     ret = sql->ExecuteNonQuery();
 
-    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH_AND_THROW(resource, L"MgdFeatureService::ExecuteSqlNonQuery")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH(resource, L"MgdFeatureService::ExecuteSqlNonQuery")
+
+    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_FEATURE_SERVICE_THROW()
+
 	return ret;
 }
 
 MgSpatialContextReader* MgdFeatureService::GetSpatialContexts(MgResourceIdentifier* resId, bool bActiveOnly) 
 {
-	CHECK_FEATURE_SOURCE_ARGUMENT(resId, L"MgdFeatureService::GetSpatialContexts");
-	Ptr<MgSpatialContextReader> mgSpatialContextReader;
+    Ptr<MgSpatialContextReader> mgSpatialContextReader;
+    MG_LOG_OPERATION_MESSAGE(L"GetSpatialContexts");
 
     MG_FEATURE_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 == resId) ? L"MgResourceIdentifier" : resId->ToString().c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_BOOL(bActiveOnly);
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
+	CHECK_FEATURE_SOURCE_ARGUMENT(resId, L"MgdFeatureService::GetSpatialContexts");
+	
     MgFeatureServiceCache* cache = MgFeatureServiceCache::GetInstance();
     mgSpatialContextReader = cache->GetSpatialContextReader(resId);
 
@@ -4247,8 +5108,22 @@
         //cache->CheckPermission(resId, MgResourcePermission::ReadOnly);
     }
 
-    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH_AND_THROW(resId, L"MgdFeatureService::GetSpatialContexts")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH(resId, L"MgdFeatureService::GetSpatialContexts")
+
+    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_FEATURE_SERVICE_THROW()
+
     return mgSpatialContextReader.Detach();
 }
 
@@ -4449,11 +5324,20 @@
 MgLongTransactionReader* MgdFeatureService::GetLongTransactions(MgResourceIdentifier* resource,
                                                                 bool bActiveOnly) 
 { 
-	CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::GetLongTransactions");
-	Ptr<MgLongTransactionReader> reader;
+    Ptr<MgLongTransactionReader> reader;
+    MG_LOG_OPERATION_MESSAGE(L"GetLongTransactions");
 
     MG_FEATURE_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_BOOL(bActiveOnly);
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
+	CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::GetLongTransactions");
+	
     Ptr<MgFeatureConnection> connWrap = new MgFeatureConnection(resource);
 	FdoPtr<FdoIConnection> conn = connWrap->GetConnection();
 
@@ -4477,22 +5361,43 @@
 	}
 	ltReader->Close();
 
-    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH_AND_THROW(resource, L"MgdFeatureService::GetLongTransactions")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH(resource, L"MgdFeatureService::GetLongTransactions")
+
+    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_FEATURE_SERVICE_THROW()
+
 	return reader.Detach();
 }
 
-bool MgdFeatureService::SetLongTransaction(MgResourceIdentifier* resource,
-                                CREFSTRING longTransactionName) 
+bool MgdFeatureService::SetLongTransaction(MgResourceIdentifier* resource, CREFSTRING longTransactionName) 
 { 
+    bool ok = false;
+    MG_LOG_OPERATION_MESSAGE(L"SetLongTransaction");
+
+    MG_FEATURE_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(longTransactionName.c_str());
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
 	CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::SetLongTransaction");
     if (longTransactionName.empty())
         throw new MgNullArgumentException(L"MgdFeatureService::SetLongTransaction", __LINE__, __WFILE__, NULL, L"", NULL);
 
-	bool ok = false;
-
-    MG_FEATURE_SERVICE_TRY()
-
 	Ptr<MgFeatureConnection> connWrap = new MgFeatureConnection(resource);
 	FdoPtr<FdoIConnection> conn = connWrap->GetConnection();
 	FdoPtr<FdoIActivateLongTransaction> activate = (FdoIActivateLongTransaction*)conn->CreateCommand(FdoCommandType_ActivateLongTransaction);
@@ -4500,8 +5405,22 @@
 	activate->Execute();
 	ok = true;
 
-    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH_AND_THROW(resource, L"MgdFeatureService::SetLongTransaction")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH(resource, L"MgdFeatureService::SetLongTransaction")
+
+    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_FEATURE_SERVICE_THROW()
+
 	return ok;
 }
 
@@ -4530,12 +5449,19 @@
 }
 
 MgStringCollection* MgdFeatureService::GetSchemas(MgResourceIdentifier* resource) 
-{ 
-	CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::GetSchemas");
+{
+    Ptr<MgStringCollection> schemaNames;
+    MG_LOG_OPERATION_MESSAGE(L"GetSchemas");
 
-    Ptr<MgStringCollection> schemaNames;
     MG_FEATURE_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();
+
+	CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::GetSchemas");
+
     Ptr<MgFeatureConnection> connWrap = new MgFeatureConnection(resource);
 	FdoPtr<FdoIConnection> conn = connWrap->GetConnection();
 
@@ -4562,20 +5488,43 @@
 		schemaNames = names;
 	}
 
-    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH_AND_THROW(resource, L"MgdFeatureService::GetSchemas")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH(resource, L"MgdFeatureService::GetSchemas")
+
+    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_FEATURE_SERVICE_THROW()
+
     return schemaNames.Detach();
 }
 
 MgStringCollection* MgdFeatureService::GetClasses(MgResourceIdentifier* resource, CREFSTRING schemaName) 
 { 
+    Ptr<MgStringCollection> classNames;
+    MG_LOG_OPERATION_MESSAGE(L"GetClasses");
+
+    MG_FEATURE_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(schemaName.c_str());
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
 	CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::GetClasses");
 	if (schemaName.empty())
 		throw new MgInvalidArgumentException(L"MgdFeatureService::GetClasses", __LINE__, __WFILE__, NULL, L"", NULL);
 
-    Ptr<MgStringCollection> classNames;
-    MG_FEATURE_SERVICE_TRY()
-
     Ptr<MgFeatureConnection> connWrap = new MgFeatureConnection(resource);
 	FdoPtr<FdoIConnection> conn = connWrap->GetConnection();
 
@@ -4613,8 +5562,22 @@
 		classNames = names;
 	}
 
-    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH_AND_THROW(resource, L"MgdFeatureService::GetClasses")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH(resource, L"MgdFeatureService::GetClasses")
+
+    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_FEATURE_SERVICE_THROW()
+
     return classNames.Detach();
 }
 
@@ -4623,9 +5586,37 @@
                                                          CREFSTRING className) 
 { 
     Ptr<MgClassDefinition> ret;
+    MG_LOG_OPERATION_MESSAGE(L"GetClassDefinition");
+
     MG_FEATURE_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(schemaName.c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(className.c_str());
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
 	ret = GetClassDefinition(resource, schemaName, className, true);
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdFeatureService::GetClassDefinition")
+
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::GetClassDefinition")
+
+    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_FEATURE_SERVICE_THROW()
+
     return ret.Detach();
 }
 
@@ -4752,15 +5743,38 @@
 
 void MgdFeatureService::CreateFeatureSource(MgResourceIdentifier* resource, MgFeatureSourceParams* sourceParams) 
 { 
+    MG_LOG_OPERATION_MESSAGE(L"CreateFeatureSource");
+
+    MG_FEATURE_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(L"MgFeatureSourceParams");
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
     CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::CreateFeatureSource");
     CHECKARGUMENTNULL(sourceParams, L"MgdFeatureService::CreateFeatureSource");
 
-    MG_FEATURE_SERVICE_TRY()
-
     Ptr<MgCreateFeatureSource> creator = new MgCreateFeatureSource();
     creator->CreateFeatureSource(resource, sourceParams);
 
-    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH_AND_THROW(resource, L"MgCreateFeatureSource.CreateFeatureSource")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH(resource, L"MgdFeatureService::CreateFeatureSource")
+
+    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_FEATURE_SERVICE_THROW()
 }
 
 MgByteReader* MgdFeatureService::DescribeWfsFeatureType(MgResourceIdentifier* featureSourceId,
@@ -4809,8 +5823,17 @@
 MgByteReader* MgdFeatureService::EnumerateDataStores(CREFSTRING providerName, CREFSTRING partialConnString) 
 { 
     Ptr<MgByteReader> reader;
+    MG_LOG_OPERATION_MESSAGE(L"EnumerateDataStores");
+
     MG_FEATURE_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(providerName.c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(partialConnString.c_str());
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
     if (providerName.empty())
         throw new MgInvalidArgumentException(L"MgdFeatureService::EnumerateDataStores", __LINE__, __WFILE__, NULL, L"", NULL);
     
@@ -4844,8 +5867,22 @@
     byteSource->SetMimeType(MgMimeType::Xml);
 	reader = byteSource->GetReader();
 
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdFeatureService::GetSchemaMapping")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::EnumerateDataStores")
+
+    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_FEATURE_SERVICE_THROW()
+
     return reader.Detach();
 }
 
@@ -4853,8 +5890,17 @@
 {	
     Ptr<MgByteReader> byteReader;
 
-	MG_FEATURE_SERVICE_TRY()
+	MG_LOG_OPERATION_MESSAGE(L"GetSchemaMapping");
 
+    MG_FEATURE_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(providerName.c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(partialConnString.c_str());
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
     Ptr<MgFeatureConnection> msfc = new MgFeatureConnection(providerName, partialConnString);
     
     if ((NULL != msfc.p) && (( msfc->IsConnectionOpen() ) || ( msfc->IsConnectionPending() )))
@@ -4929,15 +5975,36 @@
         throw new MgConnectionFailedException(L"MgdFeatureService::GetSchemaMapping()", __LINE__, __WFILE__, NULL, L"", NULL);
     }
 
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdFeatureService::GetSchemaMapping")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::GetSchemaMapping")
+
+    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_FEATURE_SERVICE_THROW()
+
     return byteReader.Detach();
 }
 
 void MgdFeatureService::RegisterProvider(CREFSTRING providerLibraryPath)
 {
+    MG_LOG_OPERATION_MESSAGE(L"RegisterProvider");
+
     MG_FEATURE_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(providerLibraryPath.c_str());
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
     FdoPtr<IProviderRegistry> provReg = FdoFeatureAccessManager::GetProviderRegistry();
     FdoPtr<IConnectionManager> connMgr = FdoFeatureAccessManager::GetConnectionManager();
 
@@ -4954,17 +6021,52 @@
                               providerLibraryPath.c_str(),
                               false);
 
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdFeatureService::RegisterProvider")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::RegisterProvider")
+
+    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_FEATURE_SERVICE_THROW()
 }
 
 void MgdFeatureService::UnregisterProvider(CREFSTRING providerName)
 {
+    MG_LOG_OPERATION_MESSAGE(L"UnregisterProvider");
+
     MG_FEATURE_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(providerName.c_str());
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
     FdoPtr<IProviderRegistry> reg = FdoFeatureAccessManager::GetProviderRegistry();
     reg->UnregisterProvider(providerName.c_str());
 
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdFeatureService::UnregisterProvider")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::UnregisterProvider")
+
+    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_FEATURE_SERVICE_THROW()
 }
 
 //INTERNAL_API:
@@ -4976,11 +6078,22 @@
                                                                          CREFSTRING className)
 
 {
-    CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::GetIdentityProperties");
     Ptr<MgPropertyDefinitionCollection> propDefs;
+    MG_LOG_OPERATION_MESSAGE(L"GetIdentityProperties");
 
     MG_FEATURE_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(schemaName.c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(className.c_str());
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
+    CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::GetIdentityProperties");
+    
     if (className.empty())
     {
         throw new MgClassNotFoundException(
@@ -5005,8 +6118,22 @@
         //Cache for future calls
         cache->SetClassIdentityProperties(resource, schemaName, className, propDefs);
     }
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdFeatureService::GetIdentityProperties")
 
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::GetIdentityProperties")
+
+    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();
+
+
     return propDefs.Detach();
 }
 
@@ -5016,11 +6143,22 @@
                                                                       CREFSTRING schemaName,
                                                                       MgStringCollection* classNames)
 {
-    CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::GetIdentityProperties");
     Ptr<MgClassDefinitionCollection> classDefs;
+    MG_LOG_OPERATION_MESSAGE(L"GetIdentityProperties");
 
     MG_FEATURE_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(schemaName.c_str());
+    MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == classNames) ? L"MgStringCollection" : classNames->GetLogString().c_str());
+    MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
+    CHECK_FEATURE_SOURCE_ARGUMENT(resource, L"MgdFeatureService::GetIdentityProperties");
+    
     classDefs = new MgClassDefinitionCollection();
     if (NULL == classNames || classNames->GetCount() == 0)
     {
@@ -5087,8 +6225,23 @@
             }
         }
     }
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdFeatureService::GetIdentityProperties")
 
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::GetIdentityProperties")
+
+    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_FEATURE_SERVICE_THROW()
+
     return classDefs.Detach();
 }
 
@@ -5096,8 +6249,14 @@
 {
     Ptr<MgByteReader> ret;
 
+    MG_LOG_OPERATION_MESSAGE(L"QueryCacheInfo");
+
     MG_FEATURE_SERVICE_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();
+
     STRING content = L"<FdoConnectionPoolInfo>";
 
     std::vector<PoolCacheEntry*> entries;
@@ -5144,8 +6303,22 @@
     byteSource->SetMimeType(MgMimeType::Xml);
 	ret = byteSource->GetReader();
 
-    MG_FEATURE_SERVICE_CATCH_AND_THROW(L"MgdFeatureService::QueryCacheInfo")
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
 
+    MG_FEATURE_SERVICE_CATCH(L"MgdFeatureService::QueryCacheInfo")
+
+    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_FEATURE_SERVICE_THROW()
+
     return ret.Detach();
 }
 



More information about the mapguide-commits mailing list