IOS-1540 Fix os_log usage. IOS-1540_GOOD
authorDirk Zimmermann <dz@pep.security>
Wed, 05 Jun 2019 16:12:20 +0200
branchIOS-1540_GOOD
changeset 8942086e487a404a
parent 8941 56333b09f232
child 8943 d33b2899d01f
IOS-1540 Fix os_log usage.
pEpForiOS/HTMLParser/Axt/HtmlToTextSaxParser.swift
pEpForiOS/UI/Login/ViewModel/LoginViewModel.swift
pEpForiOS/UI/MoveToFolder/ViewModel/MoveToFolderViewModel.swift
     1.1 --- a/pEpForiOS/HTMLParser/Axt/HtmlToTextSaxParser.swift	Wed Jun 05 16:12:20 2019 +0200
     1.2 +++ b/pEpForiOS/HTMLParser/Axt/HtmlToTextSaxParser.swift	Wed Jun 05 16:12:20 2019 +0200
     1.3 @@ -7,6 +7,8 @@
     1.4  //
     1.5  
     1.6  import Foundation
     1.7 +import os.log
     1.8 +
     1.9  import pEpIOSToolbox
    1.10  
    1.11  class HtmlToTextSaxParser: BasicSaxParser {
    1.12 @@ -60,6 +62,6 @@
    1.13      }
    1.14  
    1.15      func parser(_ parser: AXHTMLParser, parseErrorOccurred parseError: Error) {
    1.16 -        os_log(type: .error, "%@", parseError.localizedDescription)
    1.17 +        os_log("%@", type: .error, "\(parseError)")
    1.18      }
    1.19  }
     2.1 --- a/pEpForiOS/UI/Login/ViewModel/LoginViewModel.swift	Wed Jun 05 16:12:20 2019 +0200
     2.2 +++ b/pEpForiOS/UI/Login/ViewModel/LoginViewModel.swift	Wed Jun 05 16:12:20 2019 +0200
     2.3 @@ -7,6 +7,7 @@
     2.4  //
     2.5  
     2.6  import Foundation
     2.7 +import os.log
     2.8  
     2.9  import MessageModel
    2.10  import pEpIOSToolbox
    2.11 @@ -101,7 +102,7 @@
    2.12  
    2.13          func statusOk() {
    2.14              if let error = AccountSettings.AccountSettingsError(accountSettings: acSettings) {
    2.15 -                os_log(type: .error, "%{public}@", error.localizedDescription)
    2.16 +                os_log("%{public}@", type: .error, "\(error)")
    2.17                  loginViewModelLoginErrorDelegate?.handle(loginError: error)
    2.18                  return
    2.19              }
    2.20 @@ -165,7 +166,7 @@
    2.21          do {
    2.22              try theVerificationService.verify()
    2.23          } catch {
    2.24 -            os_log(type: .error, "%{public}@", error.localizedDescription)
    2.25 +            os_log("%{public}@", type: .error, "\(error)")
    2.26              loginViewModelLoginErrorDelegate?.handle(loginError: error)
    2.27          }
    2.28      }
     3.1 --- a/pEpForiOS/UI/MoveToFolder/ViewModel/MoveToFolderViewModel.swift	Wed Jun 05 16:12:20 2019 +0200
     3.2 +++ b/pEpForiOS/UI/MoveToFolder/ViewModel/MoveToFolderViewModel.swift	Wed Jun 05 16:12:20 2019 +0200
     3.3 @@ -7,6 +7,8 @@
     3.4  //
     3.5  
     3.6  import Foundation
     3.7 +import os.log
     3.8 +
     3.9  import pEpIOSToolbox
    3.10  import MessageModel
    3.11  
    3.12 @@ -87,7 +89,7 @@
    3.13  
    3.14      func moveMessagesTo(index: Int) -> Bool {
    3.15          if !(index >= 0 && index < items.count) {
    3.16 -            os_log(type: .error, "Index out of bounds")
    3.17 +            os_log("Index out of bounds", type: .error)
    3.18              return false
    3.19          }
    3.20          let targetFolder = items[index].folder