IOS-1540 Back out fc82fe2a9896: Back out: Function errorAndCrash requiring StaticString. IOS-1540_GOOD
authorDirk Zimmermann <dz@pep.security>
Tue, 11 Jun 2019 16:28:31 +0200
branchIOS-1540_GOOD
changeset 9006014ffda9201e
parent 9005 5c1178ccf99c
child 9007 0c30b7fe3132
IOS-1540 Back out fc82fe2a9896: Back out: Function errorAndCrash requiring StaticString.
Submodules/pEpIOSToolbox/pEpIOSToolbox/Other/Logger.swift
     1.1 --- a/Submodules/pEpIOSToolbox/pEpIOSToolbox/Other/Logger.swift	Tue Jun 11 16:28:31 2019 +0200
     1.2 +++ b/Submodules/pEpIOSToolbox/pEpIOSToolbox/Other/Logger.swift	Tue Jun 11 16:28:31 2019 +0200
     1.3 @@ -164,16 +164,10 @@
     1.4      public func errorAndCrash(function: String = #function,
     1.5                                filePath: String = #file,
     1.6                                fileLine: Int = #line,
     1.7 -                              _ message: StaticString,
     1.8 -                              _ args: CVarArg...) {
     1.9 -        saveLog(message: message,
    1.10 -                severity: .fault,
    1.11 -                function: function,
    1.12 -                filePath: filePath,
    1.13 -                fileLine: fileLine,
    1.14 -                args: args)
    1.15 -
    1.16 -        SystemUtils.crash("\(filePath):\(function):\(fileLine) - \(message)")
    1.17 +                              _ message: StaticString) {
    1.18 +        let msgString = "\(message)"
    1.19 +        os_log("%{public}@ %{public}@ (%{public}@):%d", msgString, function, filePath, fileLine)
    1.20 +        SystemUtils.crash(msgString)
    1.21      }
    1.22  
    1.23      /**