mapnik / node-mapnik

Bindings to mapnik for node.js
http://mapnik.org/documentation/node-mapnik
BSD 3-Clause "New" or "Revised" License
533 stars 165 forks source link

Turning on logging of the Mapnik SQL query during map rendering #987

Closed kolisko closed 1 month ago

kolisko commented 1 year ago

I have connected Mapnik to PostGIS and I am using a datasource. I would like to view the SQL query that is executed when the render() method is called. I have attempted this without success. Any idea?

 (mapnik as any).logger.set_severity((mapnik as any).severity_type.Debug);
 (mapnik as any).Logger.setSeverity((mapnik as any).Logger.DEBUG);
springmeyer commented 1 year ago

In my experience the most useful and easy thing to do is to turn on logging at the database level.