[mapguide-commits] r5499 - in trunk/MgDev/Server/src/Services: Feature Mapping Rendering

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Jan 18 17:01:46 EST 2011


Author: brucedechant
Date: 2011-01-18 14:01:46 -0800 (Tue, 18 Jan 2011)
New Revision: 5499

Modified:
   trunk/MgDev/Server/src/Services/Feature/ServerSelectFeatures.cpp
   trunk/MgDev/Server/src/Services/Mapping/MappingUtil.cpp
   trunk/MgDev/Server/src/Services/Rendering/ServerRenderingService.cpp
Log:
Update debugging messages to include thread ID.

Modified: trunk/MgDev/Server/src/Services/Feature/ServerSelectFeatures.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Feature/ServerSelectFeatures.cpp	2011-01-18 03:10:17 UTC (rev 5498)
+++ trunk/MgDev/Server/src/Services/Feature/ServerSelectFeatures.cpp	2011-01-18 22:01:46 UTC (rev 5499)
@@ -430,7 +430,7 @@
         {
             FdoPtr<FdoIGeometry> geometry = geometryFactory->CreateGeometryFromFgf(byteArray);
             STRING geomText = geometry->GetText();
-            ACE_DEBUG((LM_ERROR, ACE_TEXT("SPATIAL FILTER:\n%W\n\n"), geomText.c_str()));
+            ACE_DEBUG((LM_INFO, ACE_TEXT("(%t) SPATIAL FILTER:\n%W\n\n"), geomText.c_str()));
         }
         #endif
 

Modified: trunk/MgDev/Server/src/Services/Mapping/MappingUtil.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Mapping/MappingUtil.cpp	2011-01-18 03:10:17 UTC (rev 5498)
+++ trunk/MgDev/Server/src/Services/Mapping/MappingUtil.cpp	2011-01-18 22:01:46 UTC (rev 5499)
@@ -228,7 +228,7 @@
     }
 
 #ifdef _DEBUG
-    printf("  ExecuteFeatureQuery() total time = %6.4f (s)\n", (GetTickCount()-dwStart)/1000.0);
+    ACE_DEBUG((LM_INFO, L"(%t)  ExecuteFeatureQuery() total time = %6.4f (s)\n", (GetTickCount()-dwStart)/1000.0));
 #endif
 
     return new RSMgFeatureReader(rdr.p, svcFeature, featResId.p, options, vl->GetGeometry());
@@ -368,7 +368,7 @@
 {
     #ifdef _DEBUG
     long dwStart = GetTickCount();
-    printf("StylizeLayers() **MAPSTART** Layers:%d  Scale:%f\n", layers->GetCount(), scale);
+    ACE_DEBUG((LM_INFO, L"(%t)StylizeLayers() **MAPSTART** Layers:%d  Scale:%f\n", layers->GetCount(), scale));
     #endif
 
     // Cache coordinate system transforms for the life of the
@@ -432,7 +432,7 @@
 
         #ifdef _DEBUG
         long dwLayerStart = GetTickCount();
-        printf("  StylizeLayers(%d) **LAYERSTART** Name:%S  VAS:%S\n", i, (mapLayer->GetName()).c_str(), mapLayer->IsVisibleAtScale(scale)? L"True" : L"False");
+        ACE_DEBUG((LM_INFO, L"(%t)  StylizeLayers(%d) **LAYERSTART** Name:%W  VAS:%W\n", i, (mapLayer->GetName()).c_str(), mapLayer->IsVisibleAtScale(scale)? L"True" : L"False"));
         #endif
 
         if(mapLayer->GetLayerResourceContent() == L"")
@@ -498,7 +498,7 @@
                 if (scaleRange)
                 {
                     #ifdef _DEBUG
-                    printf("  StylizeLayers(%d) **Stylizing** Name:%S\n", i, (mapLayer->GetName()).c_str());
+                    ACE_DEBUG((LM_INFO, L"(%t)  StylizeLayers(%d) **Stylizing** Name:%W\n", i, (mapLayer->GetName()).c_str()));
                     #endif
 
                     // get feature source id
@@ -520,7 +520,7 @@
                     }
 
                     #ifdef _DEBUG
-                    printf("  StylizeLayers(%d) **Stylizing** Name:%S  Extents:%f,%f to %f,%f Expanded:%d\n", i, (mapLayer->GetName()).c_str(), extent.minx, extent.miny, extent.maxx, extent.maxy, expandExtents);
+                    ACE_DEBUG((LM_INFO, L"(%t)  StylizeLayers(%d) **Stylizing** Name:%W  Extents:%f,%f to %f,%f Expanded:%d\n", i, (mapLayer->GetName()).c_str(), extent.minx, extent.miny, extent.maxx, extent.maxy, expandExtents));
                     #endif
 
                     //get a transform from layer coord sys to map coord sys
@@ -552,7 +552,7 @@
                         overrideFilter = overrideFilters->GetItem(i);
 
                     #ifdef _DEBUG
-                    printf("  StylizeLayers(%d) **Stylizing** Name:%S  Override Filter(size=%d):\n%S\n", i, (mapLayer->GetName()).c_str(), overrideFilter.length(), overrideFilter.empty() ? L"(Empty)" : overrideFilter.c_str());
+                    ACE_DEBUG((LM_INFO, L"(%t)  StylizeLayers(%d) **Stylizing** Name:%W  Override Filter(size=%d):\n%W\n", i, (mapLayer->GetName()).c_str(), overrideFilter.length(), overrideFilter.empty() ? L"(Empty)" : overrideFilter.c_str()));
                     #endif
 
                     // create the reader we'll use
@@ -561,7 +561,7 @@
                     FdoPtr<FdoIFeatureReader> fdoReader = (NULL == rsReader) ? NULL : rsReader->GetInternalReader();
 
                     #ifdef _DEBUG
-                    printf("  StylizeLayers(%d) **Stylizing** Name:%S  Query Done.\n", i, (mapLayer->GetName()).c_str());
+                    ACE_DEBUG((LM_INFO, L"(%t)  StylizeLayers(%d) **Stylizing** Name:%W  Query Done.\n", i, (mapLayer->GetName()).c_str()));
                     #endif
 
                     if (NULL != fdoReader.p)
@@ -575,11 +575,11 @@
                         if (extractColors)
                         {
                             #ifdef _DEBUG
-                            printf("  StylizeLayers(%d) //ExtractColors// -Vector- Name:%S  Time:%6.4f (s)\n", i, (mapLayer->GetName()).c_str(), (GetTickCount()-dwLayerStart)/1000.0);
+                            ACE_DEBUG((LM_INFO, L"(%t)  StylizeLayers(%d) //ExtractColors// -Vector- Name:%W  Time:%6.4f (s)\n", i, (mapLayer->GetName()).c_str(), (GetTickCount()-dwLayerStart)/1000.0));
                             #endif
                             ExtractColors(map, scaleRange, ds);
                             #ifdef _DEBUG
-                            printf("  StylizeLayers(%d) ##ExtractColors## -Vector- Name:%S  Time:%6.4f (s)\n", i, (mapLayer->GetName()).c_str(), (GetTickCount()-dwLayerStart)/1000.0);
+                            ACE_DEBUG((LM_INFO, L"(%t)  StylizeLayers(%d) ##ExtractColors## -Vector- Name:%W  Time:%6.4f (s)\n", i, (mapLayer->GetName()).c_str(), (GetTickCount()-dwLayerStart)/1000.0));
                             #endif
                         }
                     }
@@ -587,12 +587,12 @@
                 else  // not scaleRange
                 {
                     #ifdef _DEBUG
-                    printf("  StylizeLayers(%d) **NOT Stylizing - NO SCALE RANGE** Name:%S\n", i, (mapLayer->GetName()).c_str());
+                    ACE_DEBUG((LM_INFO, L"(%t)  StylizeLayers(%d) **NOT Stylizing - NO SCALE RANGE** Name:%W\n", i, (mapLayer->GetName()).c_str()));
                     #endif
                 }
 
                 #ifdef _DEBUG
-                printf("  StylizeLayers(%d) **LAYEREND** -Vector- Name:%S  Time:%6.4f (s)\n", i, (mapLayer->GetName()).c_str(), (GetTickCount()-dwLayerStart)/1000.0);
+                ACE_DEBUG((LM_INFO, L"(%t)  StylizeLayers(%d) **LAYEREND** -Vector- Name:%W  Time:%6.4f (s)\n", i, (mapLayer->GetName()).c_str(), (GetTickCount()-dwLayerStart)/1000.0));
                 #endif
             }
             else if (gl) //############################################################################ grid layer
@@ -613,7 +613,7 @@
                     RS_Bounds extent = dr->GetBounds();
 
                     #ifdef _DEBUG
-                    printf("  StylizeLayers(%d) **Stylizing** Name:%S  Extents:%f,%f to %f,%f\n", i, (mapLayer->GetName()).c_str(), extent.minx, extent.miny, extent.maxx, extent.maxy);
+                    ACE_DEBUG((LM_INFO, L"(%t)  StylizeLayers(%d) **Stylizing** Name:%W  Extents:%f,%f to %f,%f\n", i, (mapLayer->GetName()).c_str(), extent.minx, extent.miny, extent.maxx, extent.maxy));
                     #endif
 
                     //now get the coordinate system of the layer data
@@ -688,7 +688,7 @@
                                 double ury = ur->GetY();
 
                                 #ifdef _DEBUG
-                                printf("  StylizeLayers(%d) **Stylizing** Name:%S  Extents(SpatialContext):%f,%f to %f,%f\n", i, (mapLayer->GetName()).c_str(), llx, lly, urx, ury);
+                                ACE_DEBUG((LM_INFO, L"(%t)  StylizeLayers(%d) **Stylizing** Name:%W  Extents(SpatialContext):%f,%f to %f,%f\n", i, (mapLayer->GetName()).c_str(), llx, lly, urx, ury));
                                 #endif
 
                                 if (NULL != xformer)
@@ -709,7 +709,7 @@
                     MG_CATCH_AND_RELEASE()
 
                     #ifdef _DEBUG
-                    printf("  StylizeLayers(%d) **Stylizing** Name:%S  Extents(Using):%f,%f to %f,%f\n", i, (mapLayer->GetName()).c_str(), extent.minx, extent.miny, extent.maxx, extent.maxy);
+                    ACE_DEBUG((LM_INFO, L"(%t)  StylizeLayers(%d) **Stylizing** Name:%W  Extents(Using):%f,%f to %f,%f\n", i, (mapLayer->GetName()).c_str(), extent.minx, extent.miny, extent.maxx, extent.maxy));
                     #endif
 
                     double pixelsPerMapUnit = dr->GetMetersPerUnit() / METERS_PER_INCH * dr->GetDpi() / dr->GetMapScale();
@@ -734,7 +734,7 @@
                 }
 
                 #ifdef _DEBUG
-                printf("  StylizeLayers(%d) **LAYEREND** -Grid- Name:%S  Time:%6.4f (s)\n", i, (mapLayer->GetName()).c_str(), (GetTickCount()-dwLayerStart)/1000.0);
+                ACE_DEBUG((LM_INFO, L"(%t)  StylizeLayers(%d) **LAYEREND** -Grid- Name:%W  Time:%6.4f (s)\n", i, (mapLayer->GetName()).c_str(), (GetTickCount()-dwLayerStart)/1000.0));
                 #endif
             }
             else if (dl) //############################################################################ drawing layer
@@ -793,7 +793,7 @@
                 }
 
                 #ifdef _DEBUG
-                printf("  StylizeLayers(%d) **LAYEREND** -Drawing- Name:%S  Time = %6.4f (s)\n", i, (mapLayer->GetName()).c_str(), (GetTickCount()-dwLayerStart)/1000.0);
+                ACE_DEBUG((LM_INFO, L"(%t)  StylizeLayers(%d) **LAYEREND** -Drawing- Name:%W  Time = %6.4f (s)\n", i, (mapLayer->GetName()).c_str(), (GetTickCount()-dwLayerStart)/1000.0));
                 #endif
             } // end layer switch
 
@@ -840,7 +840,7 @@
     } // for all layers
 
     #ifdef _DEBUG
-    printf("StylizeLayers() **MAPDONE** Layers:%d  Total Time:%6.4f (s)\n\n", layers->GetCount(), (GetTickCount()-dwStart)/1000.0);
+    ACE_DEBUG((LM_INFO, L"(%t)StylizeLayers() **MAPDONE** Layers:%d  Total Time:%6.4f (s)\n\n", layers->GetCount(), (GetTickCount()-dwStart)/1000.0));
     #endif
 
     TransformCache::Clear(transformCache);

Modified: trunk/MgDev/Server/src/Services/Rendering/ServerRenderingService.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Rendering/ServerRenderingService.cpp	2011-01-18 03:10:17 UTC (rev 5498)
+++ trunk/MgDev/Server/src/Services/Rendering/ServerRenderingService.cpp	2011-01-18 22:01:46 UTC (rev 5499)
@@ -758,7 +758,7 @@
 
     #ifdef _DEBUG
     Ptr<MgReadOnlyLayerCollection> selLayers = sel->GetLayers();
-    ACE_DEBUG((LM_ERROR, ACE_TEXT("MgServerRenderingService::QueryFeatures() Selection Size:%d\n"), selLayers.p? selLayers->GetCount() : 0));
+    ACE_DEBUG((LM_INFO, ACE_TEXT("(%t) MgServerRenderingService::QueryFeatures() Selection Size:%d\n"), selLayers.p? selLayers->GetCount() : 0));
     #endif
 
     MG_CATCH_AND_THROW(L"MgServerRenderingService.QueryFeatures")
@@ -1347,7 +1347,7 @@
 
     MG_TRY()
 
-    ACE_DEBUG ((LM_DEBUG, ACE_TEXT("RenderForSelection(): ** START **\n")));
+    ACE_DEBUG ((LM_DEBUG, ACE_TEXT("(%t) RenderForSelection(): ** START **\n")));
     if (NULL == map || (NULL == geometry && featureFilter.empty()))
         throw new MgNullArgumentException(L"MgServerRenderingService.RenderForSelection", __LINE__, __WFILE__, NULL, L"", NULL);
 
@@ -1432,7 +1432,7 @@
         //find the layer we need to select features from
         Ptr<MgLayerBase> layer = layers->GetItem(p);
 
-        ACE_DEBUG ((LM_DEBUG, ACE_TEXT("RenderForSelection(): Layer: %W  Selectable:%W  Visible: %W\n"), layer->GetName().c_str(), layer->GetSelectable()? L"True" : L"False", layer->IsVisibleAtScale(scale)? L"True" : L"False"));
+        ACE_DEBUG ((LM_DEBUG, ACE_TEXT("(%t) RenderForSelection(): Layer: %W  Selectable:%W  Visible: %W\n"), layer->GetName().c_str(), layer->GetSelectable()? L"True" : L"False", layer->IsVisibleAtScale(scale)? L"True" : L"False"));
 
         //do this first - this check is fast
         if (bOnlySelectableLayers && !layer->GetSelectable())
@@ -1468,7 +1468,7 @@
         //we can only do geometric query selection for vector layers
         if (vl)
         {
-            ACE_DEBUG ((LM_DEBUG, ACE_TEXT("RenderForSelection(): Layer: %W  Vector Layer\n"), layer->GetName().c_str()));
+            ACE_DEBUG ((LM_DEBUG, ACE_TEXT("(%t) RenderForSelection(): Layer: %W  Vector Layer\n"), layer->GetName().c_str()));
 
             //check to see if we want even layers that aren't visible at the current scale
             if (!bOnlyVisibleLayers)
@@ -1509,7 +1509,7 @@
                 #ifdef _DEBUG
                 // Output the selection geometry
                 STRING geomText = queryGeom->ToAwkt(true);
-                ACE_DEBUG((LM_ERROR, ACE_TEXT("SELECTION FILTER:\n%W\n\n"), geomText.c_str()));
+                ACE_DEBUG((LM_INFO, ACE_TEXT("(%t) SELECTION FILTER:\n%W\n\n"), geomText.c_str()));
                 #endif
 
                 //set the spatial filter for the selection
@@ -1679,7 +1679,7 @@
                 //do our own geometry math.
                 #ifdef _DEBUG
                 STRING error = e->GetExceptionMessage();
-                ACE_DEBUG((LM_ERROR, ACE_TEXT("RenderForSelection() - Error: %S\n"), error.c_str()));
+                ACE_DEBUG((LM_INFO, ACE_TEXT("(%t) RenderForSelection() - Error: %S\n"), error.c_str()));
                 #endif
 
                 // Let's throw the exception here, so that it can be recorded in the error log.
@@ -1689,7 +1689,7 @@
     }
 
     selRenderer->EndMap();
-    ACE_DEBUG ((LM_DEBUG, ACE_TEXT("RenderForSelection(): ** END **\n")));
+    ACE_DEBUG ((LM_DEBUG, ACE_TEXT("(%t) RenderForSelection(): ** END **\n")));
 
     MG_CATCH(L"MgServerRenderingService.RenderForSelection")
 



More information about the mapguide-commits mailing list