When running the code below, only the first entry gets logged.
Structured logging seems not to work when there are emoticons or object descriptions in the message. Is this by design?
let logger = Logger(subsystem: "TestSystem", category: "TestCategory")
logger.log("π") // Result = π
let someEmoji:String = "π"
logger.log("\(someEmoji)") // Result = empty log line
let someObjectDescription:String = String(describing:self)
logger.log("\(someObjectDescription)") // Result = empty log line
Post
Replies
Boosts
Views
Activity
I have an App with multiple string catalogs.
I mistyped the name of a table in one of my
String(localized: "Some English Text", table "nonExistingTable") instances.
I did not receive a compile-time warning telling me the table was missing and my application defaulted to the English text instead. Is this expected behaviour or a bug?
Using WeatherKit I want to get a 5-day forecast starting tomorrow,
however, I only get 4 elements in the forecast.
What am I missing here?
public func updateWeather()async{
guard locationManager.location != nil else {locationManager.updateLocation(); return}
if self.needsUpdating{
let startOfToday = Calendar.current.startOfDay(for: Date())
let endOfToday = startOfToday+24*3600
let firstDay:Date = endOfToday+1
let lastDay:Date = firstDay+(5*24*3600)
futureWeather = try? await WeatherService.shared.weather(for: locationManager.location!,
including: .daily(startDate: firstDay, endDate: lastDay)
)
}
}