Commit fd34d71e by Demid Merzlyakov

Logging improvement.

parent 87ee667f
...@@ -423,12 +423,14 @@ public class LocationManager { ...@@ -423,12 +423,14 @@ public class LocationManager {
private func makeLocation(from partialLocation: PartialLocation, completion: @escaping (Location?) -> ()) { private func makeLocation(from partialLocation: PartialLocation, completion: @escaping (Location?) -> ()) {
if let fipsCode = partialLocation.fipsCode { if let fipsCode = partialLocation.fipsCode {
if let existingLocation = locations.first(where: { $0.fipsCode == fipsCode }) { if let existingLocation = locations.first(where: { $0.fipsCode == fipsCode }) {
log.info("Geo lookup: found location using FIPS code: \(existingLocation)")
completion(existingLocation) completion(existingLocation)
return return
} }
} }
if let cityId = partialLocation.optionalCityId { if let cityId = partialLocation.optionalCityId {
if let existingLocation = locations.first(where: { $0.cityId == cityId }) { if let existingLocation = locations.first(where: { $0.cityId == cityId }) {
log.info("Geo lookup: found location using city ID: \(existingLocation)")
completion(existingLocation) completion(existingLocation)
return return
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment