diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 8204bb3..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 Rob Brown - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Logger.xcodeproj/project.pbxproj b/Logger.xcodeproj/project.pbxproj deleted file mode 100644 index 1087016..0000000 --- a/Logger.xcodeproj/project.pbxproj +++ /dev/null @@ -1,470 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - E145381E1F21008300BC701B /* Logger.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E14538141F21008300BC701B /* Logger.framework */; }; - E14538231F21008300BC701B /* LoggerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E14538221F21008300BC701B /* LoggerTests.swift */; }; - E14538251F21008300BC701B /* Logger.h in Headers */ = {isa = PBXBuildFile; fileRef = E14538171F21008300BC701B /* Logger.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E145382F1F2100B400BC701B /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = E145382E1F2100B400BC701B /* Logger.swift */; }; - E14538311F2100BC00BC701B /* LoggerFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = E14538301F2100BC00BC701B /* LoggerFactory.swift */; }; - E14538331F2100D600BC701B /* LoggerSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = E14538321F2100D600BC701B /* LoggerSettings.swift */; }; - E14538351F21019700BC701B /* LoggerBackend.swift in Sources */ = {isa = PBXBuildFile; fileRef = E14538341F21019700BC701B /* LoggerBackend.swift */; }; - E14538371F21063F00BC701B /* SpyBackend.swift in Sources */ = {isa = PBXBuildFile; fileRef = E14538361F21063F00BC701B /* SpyBackend.swift */; }; - E14538391F21068C00BC701B /* LoggerFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E14538381F21068C00BC701B /* LoggerFormatter.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - E145381F1F21008300BC701B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = E145380B1F21008300BC701B /* Project object */; - proxyType = 1; - remoteGlobalIDString = E14538131F21008300BC701B; - remoteInfo = Logger; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - E14538141F21008300BC701B /* Logger.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Logger.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - E14538171F21008300BC701B /* Logger.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Logger.h; sourceTree = ""; }; - E14538181F21008300BC701B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - E145381D1F21008300BC701B /* LoggerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LoggerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - E14538221F21008300BC701B /* LoggerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoggerTests.swift; sourceTree = ""; }; - E14538241F21008300BC701B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - E145382E1F2100B400BC701B /* Logger.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Logger.swift; sourceTree = ""; }; - E14538301F2100BC00BC701B /* LoggerFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoggerFactory.swift; sourceTree = ""; }; - E14538321F2100D600BC701B /* LoggerSettings.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoggerSettings.swift; sourceTree = ""; }; - E14538341F21019700BC701B /* LoggerBackend.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoggerBackend.swift; sourceTree = ""; }; - E14538361F21063F00BC701B /* SpyBackend.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpyBackend.swift; sourceTree = ""; }; - E14538381F21068C00BC701B /* LoggerFormatter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoggerFormatter.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - E14538101F21008300BC701B /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - E145381A1F21008300BC701B /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - E145381E1F21008300BC701B /* Logger.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - E145380A1F21008300BC701B = { - isa = PBXGroup; - children = ( - E14538161F21008300BC701B /* Logger */, - E14538211F21008300BC701B /* LoggerTests */, - E14538151F21008300BC701B /* Products */, - ); - sourceTree = ""; - }; - E14538151F21008300BC701B /* Products */ = { - isa = PBXGroup; - children = ( - E14538141F21008300BC701B /* Logger.framework */, - E145381D1F21008300BC701B /* LoggerTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - E14538161F21008300BC701B /* Logger */ = { - isa = PBXGroup; - children = ( - E145382E1F2100B400BC701B /* Logger.swift */, - E14538341F21019700BC701B /* LoggerBackend.swift */, - E14538381F21068C00BC701B /* LoggerFormatter.swift */, - E14538321F2100D600BC701B /* LoggerSettings.swift */, - E14538301F2100BC00BC701B /* LoggerFactory.swift */, - E14538171F21008300BC701B /* Logger.h */, - E14538181F21008300BC701B /* Info.plist */, - ); - path = Logger; - sourceTree = ""; - }; - E14538211F21008300BC701B /* LoggerTests */ = { - isa = PBXGroup; - children = ( - E14538361F21063F00BC701B /* SpyBackend.swift */, - E14538221F21008300BC701B /* LoggerTests.swift */, - E14538241F21008300BC701B /* Info.plist */, - ); - path = LoggerTests; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - E14538111F21008300BC701B /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - E14538251F21008300BC701B /* Logger.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - E14538131F21008300BC701B /* Logger */ = { - isa = PBXNativeTarget; - buildConfigurationList = E14538281F21008300BC701B /* Build configuration list for PBXNativeTarget "Logger" */; - buildPhases = ( - E145380F1F21008300BC701B /* Sources */, - E14538101F21008300BC701B /* Frameworks */, - E14538111F21008300BC701B /* Headers */, - E14538121F21008300BC701B /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Logger; - productName = Logger; - productReference = E14538141F21008300BC701B /* Logger.framework */; - productType = "com.apple.product-type.framework"; - }; - E145381C1F21008300BC701B /* LoggerTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = E145382B1F21008300BC701B /* Build configuration list for PBXNativeTarget "LoggerTests" */; - buildPhases = ( - E14538191F21008300BC701B /* Sources */, - E145381A1F21008300BC701B /* Frameworks */, - E145381B1F21008300BC701B /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - E14538201F21008300BC701B /* PBXTargetDependency */, - ); - name = LoggerTests; - productName = LoggerTests; - productReference = E145381D1F21008300BC701B /* LoggerTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - E145380B1F21008300BC701B /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0830; - LastUpgradeCheck = 1010; - ORGANIZATIONNAME = "Robert Brown"; - TargetAttributes = { - E14538131F21008300BC701B = { - CreatedOnToolsVersion = 8.3.3; - DevelopmentTeam = 5U8G94UWTC; - LastSwiftMigration = 1010; - ProvisioningStyle = Automatic; - }; - E145381C1F21008300BC701B = { - CreatedOnToolsVersion = 8.3.3; - DevelopmentTeam = 5U8G94UWTC; - LastSwiftMigration = 1010; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = E145380E1F21008300BC701B /* Build configuration list for PBXProject "Logger" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = E145380A1F21008300BC701B; - productRefGroup = E14538151F21008300BC701B /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - E14538131F21008300BC701B /* Logger */, - E145381C1F21008300BC701B /* LoggerTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - E14538121F21008300BC701B /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - E145381B1F21008300BC701B /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - E145380F1F21008300BC701B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - E14538331F2100D600BC701B /* LoggerSettings.swift in Sources */, - E14538311F2100BC00BC701B /* LoggerFactory.swift in Sources */, - E14538351F21019700BC701B /* LoggerBackend.swift in Sources */, - E14538391F21068C00BC701B /* LoggerFormatter.swift in Sources */, - E145382F1F2100B400BC701B /* Logger.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - E14538191F21008300BC701B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - E14538371F21063F00BC701B /* SpyBackend.swift in Sources */, - E14538231F21008300BC701B /* LoggerTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - E14538201F21008300BC701B /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = E14538131F21008300BC701B /* Logger */; - targetProxy = E145381F1F21008300BC701B /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - E14538261F21008300BC701B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.3; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - E14538271F21008300BC701B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.3; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - E14538291F21008300BC701B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = 5U8G94UWTC; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Logger/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = pro.tricksofthetrade.Logger; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.2; - }; - name = Debug; - }; - E145382A1F21008300BC701B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = 5U8G94UWTC; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Logger/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = pro.tricksofthetrade.Logger; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.2; - }; - name = Release; - }; - E145382C1F21008300BC701B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - DEVELOPMENT_TEAM = 5U8G94UWTC; - INFOPLIST_FILE = LoggerTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = pro.tricksofthetrade.LoggerTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.2; - }; - name = Debug; - }; - E145382D1F21008300BC701B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - DEVELOPMENT_TEAM = 5U8G94UWTC; - INFOPLIST_FILE = LoggerTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = pro.tricksofthetrade.LoggerTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.2; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - E145380E1F21008300BC701B /* Build configuration list for PBXProject "Logger" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E14538261F21008300BC701B /* Debug */, - E14538271F21008300BC701B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - E14538281F21008300BC701B /* Build configuration list for PBXNativeTarget "Logger" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E14538291F21008300BC701B /* Debug */, - E145382A1F21008300BC701B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - E145382B1F21008300BC701B /* Build configuration list for PBXNativeTarget "LoggerTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E145382C1F21008300BC701B /* Debug */, - E145382D1F21008300BC701B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = E145380B1F21008300BC701B /* Project object */; -} diff --git a/Logger.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Logger.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 0ca1195..0000000 --- a/Logger.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Logger.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Logger.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/Logger.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Logger.xcodeproj/xcshareddata/xcschemes/Logger.xcscheme b/Logger.xcodeproj/xcshareddata/xcschemes/Logger.xcscheme deleted file mode 100644 index c765030..0000000 --- a/Logger.xcodeproj/xcshareddata/xcschemes/Logger.xcscheme +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Logger.xcodeproj/xcuserdata/robert.xcuserdatad/xcschemes/xcschememanagement.plist b/Logger.xcodeproj/xcuserdata/robert.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index c6f29a7..0000000 --- a/Logger.xcodeproj/xcuserdata/robert.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,27 +0,0 @@ - - - - - SchemeUserState - - Logger.xcscheme_^#shared#^_ - - orderHint - 0 - - - SuppressBuildableAutocreation - - E14538131F21008300BC701B - - primary - - - E145381C1F21008300BC701B - - primary - - - - - diff --git a/Logger/Info.plist b/Logger/Info.plist deleted file mode 100644 index 0865cde..0000000 --- a/Logger/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 0.2.3 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Logger/Logger.h b/Logger/Logger.h deleted file mode 100644 index a252ea8..0000000 --- a/Logger/Logger.h +++ /dev/null @@ -1,35 +0,0 @@ -// -// Logger.h -// -// Copyright (c) 2017 Robert Brown -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -#import - -//! Project version number for Logger. -FOUNDATION_EXPORT double LoggerVersionNumber; - -//! Project version string for Logger. -FOUNDATION_EXPORT const unsigned char LoggerVersionString[]; - -// In this header, you should import all the public headers of your framework using statements like #import - - diff --git a/LoggerTests/Info.plist b/LoggerTests/Info.plist deleted file mode 100644 index 6c6c23c..0000000 --- a/LoggerTests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/LoggerTests/LoggerTests.swift b/LoggerTests/LoggerTests.swift deleted file mode 100644 index 4c8b556..0000000 --- a/LoggerTests/LoggerTests.swift +++ /dev/null @@ -1,99 +0,0 @@ -// -// LoggerTests.swift -// -// Copyright (c) 2017 Robert Brown -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import XCTest -@testable import Logger - -class LoggerTests: XCTestCase { - - var factory = LoggerFactory() - - override func setUp() { - factory = LoggerFactory() - } - - func testLoggerNamed() { - XCTAssert(factory.logger(named: "testLoggerNamed") === factory.logger(named: "testLoggerNamed")) - XCTAssertEqual(factory.loggerNames, ["testLoggerNamed"]) - } - - func testLog() { - let logger = factory.logger(named: "testLog") - let backend = SpyBackend() - logger.settings = LoggerSettings(original: logger.settings, level: .debug, backend: backend) - logger.error("This is an error log") - logger.warn("This is a warn log") - logger.info("This is an info log") - logger.debug("This is a debug log") - logger.log(string: "This should never be seen.", level: .disable) - - let expected = [ - "[testLog:ERROR]: This is an error log", - "[testLog:WARN]: This is a warn log", - "[testLog:INFO]: This is an info log", - "[testLog:DEBUG]: This is a debug log", - ] - - XCTAssertEqual(backend.logs, expected) - } - - func testLogLevel() { - let logger = factory.logger(named: "testLogLevel") - let backend = SpyBackend() - logger.settings = LoggerSettings(original: logger.settings, level: .warn, backend: backend) - logger.error("This is an error log") - logger.warn("This is a warn log") - logger.info("This is an info log") - logger.debug("This is a debug log") - logger.log(string: "This should never be seen.", level: .disable) - - XCTAssertEqual(backend.logs, ["[testLogLevel:ERROR]: This is an error log", "[testLogLevel:WARN]: This is a warn log"]) - } - - func testDisabledLogs() { - let logger = factory.logger(named: "testDisabledLogs") - let backend = SpyBackend() - logger.settings = LoggerSettings(original: logger.settings, level: .disable, backend: backend) - logger.error("This is an error log") - logger.warn("This is a warn log") - logger.info("This is an info log") - logger.debug("This is a debug log") - logger.log(string: "This should never be seen.", level: .disable) - - XCTAssertEqual(backend.logs, []) - } - - func testLogEmptyString() { - let logger = factory.logger(named: "testLogEmptyString") - let backend = SpyBackend() - logger.settings = LoggerSettings(original: logger.settings, level: .debug, backend: backend) - logger.error("") - logger.warn("") - logger.info("") - logger.debug("") - logger.log(string: "", level: .disable) - - XCTAssertEqual(backend.logs, []) - } -} diff --git a/LoggerTests/SpyBackend.swift b/LoggerTests/SpyBackend.swift deleted file mode 100644 index 11f504d..0000000 --- a/LoggerTests/SpyBackend.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// SpyBackend.swift -// -// Copyright (c) 2017 Robert Brown -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation -import Logger - -final class SpyBackend: LoggerBackend { - - public private(set) var logs = [String]() - - init() {} - - func log(string: String, level: LoggerLevel, metadata: [String : Any], name: String, settings: LoggerSettings) { - let output = settings.formatter.format(string: string, level: level, metadata: metadata, name: name, settings: settings) - logs.append(output) - } -} diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..5f36c47 --- /dev/null +++ b/Package.swift @@ -0,0 +1,28 @@ +// swift-tools-version:5.3 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "Logger", + products: [ + // Products define the executables and libraries a package produces, and make them visible to other packages. + .library( + name: "Logger", + targets: ["Logger"]), + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + // .package(url: /* package url */, from: "1.0.0"), + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages this package depends on. + .target( + name: "Logger", + dependencies: []), + .testTarget( + name: "LoggerTests", + dependencies: ["Logger"]), + ] +) diff --git a/README.md b/README.md new file mode 100644 index 0000000..df949fd --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Logger + +A simple yet highly-customizable logger. diff --git a/Logger/Logger.swift b/Sources/Logger/Logger.swift similarity index 100% rename from Logger/Logger.swift rename to Sources/Logger/Logger.swift diff --git a/Logger/LoggerBackend.swift b/Sources/Logger/LoggerBackend.swift similarity index 100% rename from Logger/LoggerBackend.swift rename to Sources/Logger/LoggerBackend.swift diff --git a/Logger/LoggerFactory.swift b/Sources/Logger/LoggerFactory.swift similarity index 100% rename from Logger/LoggerFactory.swift rename to Sources/Logger/LoggerFactory.swift diff --git a/Logger/LoggerFormatter.swift b/Sources/Logger/LoggerFormatter.swift similarity index 100% rename from Logger/LoggerFormatter.swift rename to Sources/Logger/LoggerFormatter.swift diff --git a/Logger/LoggerSettings.swift b/Sources/Logger/LoggerSettings.swift similarity index 100% rename from Logger/LoggerSettings.swift rename to Sources/Logger/LoggerSettings.swift diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift new file mode 100644 index 0000000..a2e5bac --- /dev/null +++ b/Tests/LinuxMain.swift @@ -0,0 +1,7 @@ +import XCTest + +import LoggerTests + +var tests = [XCTestCaseEntry]() +tests += LoggerTests.allTests() +XCTMain(tests) diff --git a/Tests/LoggerTests/LoggerTests.swift b/Tests/LoggerTests/LoggerTests.swift new file mode 100644 index 0000000..8013e8a --- /dev/null +++ b/Tests/LoggerTests/LoggerTests.swift @@ -0,0 +1,5 @@ +import XCTest +@testable import Logger + +final class LoggerTests: XCTestCase { +} diff --git a/Tests/LoggerTests/XCTestManifests.swift b/Tests/LoggerTests/XCTestManifests.swift new file mode 100644 index 0000000..f8c3c37 --- /dev/null +++ b/Tests/LoggerTests/XCTestManifests.swift @@ -0,0 +1,9 @@ +import XCTest + +#if !canImport(ObjectiveC) +public func allTests() -> [XCTestCaseEntry] { + return [ + testCase(LoggerTests.allTests), + ] +} +#endif