Adopt consolidated logging mechanism (#4370)

* Adopted the new MXLog and replaced NSLog throughout the application - vector-im/element-ios/issues/4351
* Replaced NSLog() and print() usages with MXLog.debug()
* Added swiftlint rules for NSLog(), print(), println() and os_log()
* Escape paths used to run script build phases for swiftlint and swiftgen
This commit is contained in:
Stefan Ceriu
2021-06-03 11:30:07 +03:00
committed by GitHub
parent e60647c2cd
commit a8b0e8700e
94 changed files with 689 additions and 630 deletions

View File

@@ -96,7 +96,7 @@ final class SettingsIdentityServerViewModel: SettingsIdentityServerViewModelType
viewStateUpdate(.loading)
self.checkIdentityServerValidity(identityServer: newIdentityServer) { (identityServerValidityResponse) in
print("[SettingsIdentityServerViewModel] checkCanAddIdentityServer: \(newIdentityServer). Validity: \(identityServerValidityResponse)")
MXLog.debug("[SettingsIdentityServerViewModel] checkCanAddIdentityServer: \(newIdentityServer). Validity: \(identityServerValidityResponse)")
switch identityServerValidityResponse {
case .success(let identityServerValidity):
@@ -119,7 +119,7 @@ final class SettingsIdentityServerViewModel: SettingsIdentityServerViewModelType
switch response {
case .success(let accessToken):
guard let accessToken = accessToken else {
print("[SettingsIdentityServerViewModel] accessToken: Error: No access token")
MXLog.debug("[SettingsIdentityServerViewModel] accessToken: Error: No access token")
viewStateUpdate(.error(SettingsIdentityServerViewModelError.unknown))
return
}