Commit fd34d71e by Demid Merzlyakov

Logging improvement.

parent 87ee667f
......@@ -423,12 +423,14 @@ public class LocationManager {
private func makeLocation(from partialLocation: PartialLocation, completion: @escaping (Location?) -> ()) {
if let fipsCode = partialLocation.fipsCode {
if let existingLocation = locations.first(where: { $0.fipsCode == fipsCode }) {
log.info("Geo lookup: found location using FIPS code: \(existingLocation)")
completion(existingLocation)
return
}
}
if let cityId = partialLocation.optionalCityId {
if let existingLocation = locations.first(where: { $0.cityId == cityId }) {
log.info("Geo lookup: found location using city ID: \(existingLocation)")
completion(existingLocation)
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