diff --git a/plugins/input/sqlite/sqlite_prepared.hpp b/plugins/input/sqlite/sqlite_prepared.hpp index 477759f5d..f10ad7288 100644 --- a/plugins/input/sqlite/sqlite_prepared.hpp +++ b/plugins/input/sqlite/sqlite_prepared.hpp @@ -24,6 +24,7 @@ #define MAPNIK_SQLITE_PREPARED_HPP // mapnik +#include #include #include #include @@ -77,11 +78,13 @@ public: { if (*(*ds_)) { - std::cerr << "ERR:" << sqlite3_errmsg(*(*ds_)) << "\n"; + MAPNIK_LOG_ERROR(sqlite) << "~prepared_index_statement:" + << sqlite3_errmsg(*(*ds_)); } else { - std::cerr << "SQLite Plugin: " << res << "\n"; + MAPNIK_LOG_ERROR(sqlite) << "~prepared_index_statement:" + << res; } } } diff --git a/plugins/input/sqlite/sqlite_resultset.hpp b/plugins/input/sqlite/sqlite_resultset.hpp index 9c10eb0f3..909a4dac4 100644 --- a/plugins/input/sqlite/sqlite_resultset.hpp +++ b/plugins/input/sqlite/sqlite_resultset.hpp @@ -24,6 +24,7 @@ #define MAPNIK_SQLITE_RESULTSET_HPP // mapnik +#include #include #include diff --git a/plugins/input/sqlite/sqlite_utils.hpp b/plugins/input/sqlite/sqlite_utils.hpp index 6caee666c..90f0446a1 100644 --- a/plugins/input/sqlite/sqlite_utils.hpp +++ b/plugins/input/sqlite/sqlite_utils.hpp @@ -29,6 +29,7 @@ #include // mapnik +#include #include #include #include @@ -556,7 +557,7 @@ public: } catch (std::exception const& ex) { - //std::clog << "no: " << ex.what() << "\n"; + MAPNIK_LOG_DEBUG(sqlite) << "has_rtree returned:" << ex.what(); return false; } return false; @@ -609,9 +610,7 @@ public: break; default: -#ifdef MAPNIK_DEBUG - std::clog << "Sqlite Plugin: unknown type_oid=" << type_oid << std::endl; -#endif + MAPNIK_LOG_DEBUG(sqlite) << "detect_types_from_subquery: unknown type_oid=" << type_oid; break; } } @@ -691,20 +690,22 @@ public: desc.add_descriptor(mapnik::attribute_descriptor(fld_name, mapnik::String)); } } -#ifdef MAPNIK_DEBUG else { // "Column Affinity" says default to "Numeric" but for now we pass.. //desc_.add_descriptor(attribute_descriptor(fld_name,mapnik::Double)); - // TODO - this should not fail when we specify geometry_field in XML file - - std::clog << "Sqlite Plugin: column '" - << std::string(fld_name) - << "' unhandled due to unknown type: " - << fld_type << std::endl; - } +#ifdef MAPNIK_LOG + // Do not fail when we specify geometry_field in XML file + if (field.empty()) + { + MAPNIK_LOG_DEBUG(sqlite) << "Column '" + << std::string(fld_name) + << "' unhandled due to unknown type: " + << fld_type; + } #endif + } } }