Thursday, 11 April 2013

MapGuide tidibts: Stylization error logging

Ever look at an image of a map, and you know something is not right? You look at the error logs and you don't see anything amiss?

Try setting this value in serverconfig.ini:

LogsDetail = MappingService:2

What does this setting do? It sets the logging detail for Mapping Service related operations to Trace, Warnings and Errors

When an error occurs during individual feature stylization, caught exceptions are logged as warnings, which sort of makes sense as MapGuide would be pretty flimsy if the rendering bailed out on the first bad feature it encounters during stylization.

What this means however is that if errors do occur on individual feature stylization you won't see anything in the logs because the default logging level is Errors only.

What could trigger such errors that won't be logged by default? Things involving FDO expressions in any styling or symbolization property in your Layer Definition.

  • Malformed FDO expression syntax
  • Calls to non-existent FDO expression functions
  • References to non-existent feature properties
Applying the above setting will reveal such errors.

Be warned though, logging can be extremely noisy as stylization errors for each feature are logged. So use this setting with care (obviously turn it on for debugging purposes, and turn it off when done).

1 comment:

Zac Spitzer said...

Very Useful! it's a shame it requires a server restart to enable this level of logging globally.

Level 2 includes the detailed stack trace... extremely verbose