boku-ilen / geodot-plugin

Godot plugin for loading geospatial data
GNU General Public License v3.0
108 stars 18 forks source link

CPP has no logging #50

Open clemens-tolboom opened 3 years ago

clemens-tolboom commented 3 years ago

Not sure this is useful but could we log (add debug switch) some internal state?

I did a simple test printing path.

Is there info useful for debugging provided data sources, fields, etc or are there better data validation tools?

(base) Clemenss-MacBook-Pro:geodot-plugin clemens$ git diff
diff --git a/src/geodot.cpp b/src/geodot.cpp
index acc61cc..6b26e57 100644
--- a/src/geodot.cpp
+++ b/src/geodot.cpp
@@ -24,6 +24,7 @@ Ref<GeoDataset> Geodot::get_dataset(String path) {
     Ref<GeoDataset> dataset;
     dataset.instance();

+    std::cout << "Using file: " << path.utf8().get_data() << std::endl;
     dataset->load_from_file(path);

     return dataset;
kb173 commented 3 years ago

Yeah, the ability to create debug builds with additional output could be quite helpful!