IOS-1276 rm obsolete zlog()
authorDirk Zimmermann <dz@pep.security>
Thu, 17 Jan 2019 08:33:29 +0100
changeset 753684f5a6fb7beb
parent 7535 e1651e9a8765
child 7537 a7991e4c07cf
IOS-1276 rm obsolete zlog()
pEpForiOS.xcodeproj/project.pbxproj
pEpForiOS/Util/Log.swift
pEpForiOSTests/LogTest.swift
     1.1 --- a/pEpForiOS.xcodeproj/project.pbxproj	Thu Jan 17 08:33:29 2019 +0100
     1.2 +++ b/pEpForiOS.xcodeproj/project.pbxproj	Thu Jan 17 08:33:29 2019 +0100
     1.3 @@ -413,7 +413,6 @@
     1.4  		438F4EE1215F9CB300168B5E /* SimplifiedKeyImport_Harry_To_Rick_with_Leon.txt in Resources */ = {isa = PBXBuildFile; fileRef = 438F4EE0215F9CB300168B5E /* SimplifiedKeyImport_Harry_To_Rick_with_Leon.txt */; };
     1.5  		438F4EE5215FAD0500168B5E /* Harry Bryant iostest002@peptest.ch (0x5716EA2D9AE32468) pub-sec.asc in Resources */ = {isa = PBXBuildFile; fileRef = 438F4EE4215FAD0500168B5E /* Harry Bryant iostest002@peptest.ch (0x5716EA2D9AE32468) pub-sec.asc */; };
     1.6  		438F4EE9215FB99400168B5E /* Leon Kowalski (19B9EE3B) – Private.asc in Resources */ = {isa = PBXBuildFile; fileRef = 438F4EE8215FB99400168B5E /* Leon Kowalski (19B9EE3B) – Private.asc */; };
     1.7 -		4393673921C26F3D00FF8BB4 /* LogTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4393673821C26F3D00FF8BB4 /* LogTest.swift */; };
     1.8  		4395CDEC20AAB2E9003FC5F1 /* UIImage+GIF.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4395CDEB20AAB2E9003FC5F1 /* UIImage+GIF.swift */; };
     1.9  		4395CDEE20AAC909003FC5F1 /* UIImageExtensionsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4395CDED20AAC909003FC5F1 /* UIImageExtensionsTests.swift */; };
    1.10  		4395CDF020AAD0D7003FC5F1 /* icon_001.gif in Resources */ = {isa = PBXBuildFile; fileRef = 4395CDEF20AAD0D6003FC5F1 /* icon_001.gif */; };
    1.11 @@ -1062,7 +1061,6 @@
    1.12  		438F4EE0215F9CB300168B5E /* SimplifiedKeyImport_Harry_To_Rick_with_Leon.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SimplifiedKeyImport_Harry_To_Rick_with_Leon.txt; sourceTree = "<group>"; };
    1.13  		438F4EE4215FAD0500168B5E /* Harry Bryant iostest002@peptest.ch (0x5716EA2D9AE32468) pub-sec.asc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Harry Bryant iostest002@peptest.ch (0x5716EA2D9AE32468) pub-sec.asc"; sourceTree = "<group>"; };
    1.14  		438F4EE8215FB99400168B5E /* Leon Kowalski (19B9EE3B) – Private.asc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Leon Kowalski (19B9EE3B) – Private.asc"; sourceTree = "<group>"; };
    1.15 -		4393673821C26F3D00FF8BB4 /* LogTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogTest.swift; sourceTree = "<group>"; };
    1.16  		4395CDEB20AAB2E9003FC5F1 /* UIImage+GIF.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIImage+GIF.swift"; sourceTree = "<group>"; };
    1.17  		4395CDED20AAC909003FC5F1 /* UIImageExtensionsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIImageExtensionsTests.swift; sourceTree = "<group>"; };
    1.18  		4395CDEF20AAD0D6003FC5F1 /* icon_001.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = icon_001.gif; sourceTree = "<group>"; };
    1.19 @@ -2337,7 +2335,6 @@
    1.20  				4395CDED20AAC909003FC5F1 /* UIImageExtensionsTests.swift */,
    1.21  				434DDC2A20D10F9A00755F44 /* EncryptionTests.swift */,
    1.22  				438BA0F4214F89CC001A4A82 /* MailParsingTests.swift */,
    1.23 -				4393673821C26F3D00FF8BB4 /* LogTest.swift */,
    1.24  				43C273DC21C9024A002EB4C8 /* LoggerTest.swift */,
    1.25  			);
    1.26  			path = pEpForiOSTests;
    1.27 @@ -3724,7 +3721,6 @@
    1.28  				F73E4F72217F238300CCFFED /* FolderSectionViewModelTests.swift in Sources */,
    1.29  				15A763D11F72D68000670313 /* KeyChainTest.swift in Sources */,
    1.30  				43EC75B32164E97800048CFE /* DecryptionUtil.swift in Sources */,
    1.31 -				4393673921C26F3D00FF8BB4 /* LogTest.swift in Sources */,
    1.32  				43C7B9D11CEC4DDF007A612F /* MiscTests.swift in Sources */,
    1.33  				434DDC2B20D10F9A00755F44 /* EncryptionTests.swift in Sources */,
    1.34  				151F71FA202A06760057C74D /* DecryptionAttemptCounterDelegate.swift in Sources */,
     2.1 --- a/pEpForiOS/Util/Log.swift	Thu Jan 17 08:33:29 2019 +0100
     2.2 +++ b/pEpForiOS/Util/Log.swift	Thu Jan 17 08:33:29 2019 +0100
     2.3 @@ -17,42 +17,6 @@
     2.4      case error
     2.5  }
     2.6  
     2.7 -public func zlog(_ message: StaticString,
     2.8 -                 function: String = #function,
     2.9 -                 filePath: String = #file,
    2.10 -                 fileLine: Int = #line,
    2.11 -                 _ args: CVarArg...) {
    2.12 -    if #available(iOS 10.0, macOS 10.12, tvOS 10.0, watchOS 3.0, *) {
    2.13 -        os_log("%@:%d %@:", filePath, fileLine, function)
    2.14 -        switch args.count {
    2.15 -        case 1:
    2.16 -            os_log(message, args[0])
    2.17 -        case 2:
    2.18 -            os_log(message, args[0], args[1])
    2.19 -        case 3:
    2.20 -            os_log(message, args[0], args[1], args[2])
    2.21 -        case 4:
    2.22 -            os_log(message, args[0], args[1], args[2], args[3])
    2.23 -        case 5:
    2.24 -            os_log(message, args[0], args[1], args[2], args[3], args[4])
    2.25 -        case 6:
    2.26 -            os_log(message, args[0], args[1], args[2], args[3], args[4], args[5])
    2.27 -        case 7:
    2.28 -            os_log(message, args[0], args[1], args[2], args[3], args[4], args[5], args[6])
    2.29 -        case 8:
    2.30 -            os_log(message, args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7])
    2.31 -        case 9:
    2.32 -            os_log(message, args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7],
    2.33 -                   args[8])
    2.34 -        case 10:
    2.35 -            os_log(message, args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7],
    2.36 -                   args[8], args[9])
    2.37 -        default:
    2.38 -            os_log(message, args)
    2.39 -        }
    2.40 -    }
    2.41 -}
    2.42 -
    2.43  /**
    2.44   Handling the actual logging.
    2.45   */
     3.1 --- a/pEpForiOSTests/LogTest.swift	Thu Jan 17 08:33:29 2019 +0100
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,23 +0,0 @@
     3.4 -//
     3.5 -//  LogTest.swift
     3.6 -//  pEpForiOSTests
     3.7 -//
     3.8 -//  Created by Dirk Zimmermann on 13.12.18.
     3.9 -//  Copyright © 2018 p≡p Security S.A. All rights reserved.
    3.10 -//
    3.11 -
    3.12 -import XCTest
    3.13 -import os.log
    3.14 -
    3.15 -@testable import pEpForiOS
    3.16 -@testable import MessageModel
    3.17 -
    3.18 -class LogTest: XCTestCase {
    3.19 -    func testSimple() {
    3.20 -        zlog("zlog simple message")
    3.21 -        zlog("%d %@", 1, "zlog blah")
    3.22 -        if #available(iOS 10.0, macOS 10.12, tvOS 10.0, watchOS 3.0, *) {
    3.23 -            os_log("%d %@", 1, "direct blah")
    3.24 -        }
    3.25 -    }
    3.26 -}