diff --git a/src/location/resolver.zig b/src/location/resolver.zig index cc15e85..a55c058 100644 --- a/src/location/resolver.zig +++ b/src/location/resolver.zig @@ -4,6 +4,8 @@ const GeoCache = @import("GeoCache.zig"); const Airports = @import("Airports.zig"); const Coordinates = @import("../Coordinates.zig"); +const log = std.log.scoped(.resolver); + pub const Location = struct { name: []const u8, coords: Coordinates, @@ -92,6 +94,7 @@ pub const Resolver = struct { }; } + log.info("Calling nominatim (OpenStreetMap) to resolve place name {s} to coordinates", .{name}); // Call Nominatim API const url = try std.fmt.allocPrint( self.allocator, @@ -142,6 +145,7 @@ pub const Resolver = struct { const display_name = first.object.get("display_name").?.string; const lat = try std.fmt.parseFloat(f64, first.object.get("lat").?.string); const lon = try std.fmt.parseFloat(f64, first.object.get("lon").?.string); + log.info("nominatim resolved place name {s} to {}, {}", .{ name, lat, lon }); // Cache the result try self.geocache.put(name, .{