Worth a thought for sure...
static func relogSavedLogMessages() {
reloggingSavedLogs = true
let _savedLogMessages = Array(savedLogMessage)
savedLogMessage = []
for message in _savedLogMessages {
logMessage(level: .info, functionName: #function, category: Constants.logging.music, formattedMessage: "Relogging - %@", parameters: message)
}
reloggingSavedLogs = false
if crashNeedsToBeLogged {
/// log the crash
crashNeedsToBeLogged = false
BaseLoggingSupport.logMessage(level: .crash, functionName: #function, category: Constants.logging.music, formattedMessage: "App Crash Detected")
BaseUISupport.postErrorMessage("App Crash Detected", obj: nil, error: nil, errorType: .red)
}
}
BaseLoggingSupport.logMessage is essentially a wrapper around the OSLog functionality.
I had starting the app before the api last changed and decided to ensure I would only have to adjust one location if it changed again.
I'm seeing the current time in the text such as
relogSavedLogMessage() - Relogging - 03/01/2022 12:57:53 - countOfFetch(table:Predicate:) - Success 72
The logging time stamp for when the relogging shows after it as 03/01 125753
Topic:
Programming Languages
SubTopic:
Swift
Tags: