├── .gitignore ├── .travis.yml ├── LICENSE ├── Log.podspec ├── Log.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── xcshareddata │ └── xcschemes │ │ ├── Log OSX.xcscheme │ │ ├── Log iOS.xcscheme │ │ ├── Log tvOS.xcscheme │ │ └── Log watchOS.xcscheme └── xcuserdata │ └── damien.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ └── xcschememanagement.plist ├── Package.swift ├── README.md ├── Source ├── Benchmarker.swift ├── Extensions │ ├── Formatters.swift │ └── Themes.swift ├── Formatter.swift ├── Logger.swift ├── Supporting Files │ ├── Info.plist │ ├── Log.h │ └── Utilities.swift └── Theme.swift └── Tests ├── LogTests.swift └── Supporting Files └── Info.plist /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, 4 | # Objective-C.gitignore & Swift.gitignore 5 | 6 | ## Build generated 7 | build/ 8 | DerivedData 9 | 10 | ## Various settings 11 | *.pbxuser 12 | !default.pbxuser 13 | *.mode1v3 14 | !default.mode1v3 15 | *.mode2v3 16 | !default.mode2v3 17 | *.perspectivev3 18 | !default.perspectivev3 19 | xcuserdata 20 | 21 | ## Other 22 | *.xccheckout 23 | *.moved-aside 24 | *.xcuserstate 25 | *.xcscmblueprint 26 | 27 | ## Obj-C/Swift specific 28 | *.hmap 29 | *.ipa 30 | 31 | # Carthage 32 | Carthage/Build 33 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: swift 2 | 3 | branches: 4 | only: 5 | - master 6 | 7 | xcode_project: Log.xcodeproj 8 | xcode_scheme: LogTests 9 | osx_image: xcode11.2 10 | 11 | script: 12 | - xcodebuild test -project Log.xcodeproj -scheme "Log iOS" -destination "platform=iOS Simulator,name=iPhone 11" 13 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015-2016 Damien (http://delba.io) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /Log.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "Log" 3 | s.version = "2.0" 4 | s.license = { :type => "MIT" } 5 | s.homepage = "https://github.com/delba/Log" 6 | s.author = { "Damien" => "damien@delba.io" } 7 | s.summary = "An extensible logging framework for Swift" 8 | s.source = { :git => "https://github.com/delba/Log.git", :tag => s.version } 9 | s.swift_version = '5.0' 10 | 11 | s.ios.deployment_target = "8.0" 12 | s.osx.deployment_target = "10.9" 13 | s.tvos.deployment_target = "9.0" 14 | s.watchos.deployment_target = "2.0" 15 | 16 | s.source_files = "Source/**/*.{swift, h}" 17 | 18 | s.requires_arc = true 19 | end 20 | -------------------------------------------------------------------------------- /Log.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 6D047BF31CD8FC3800B51152 /* Benchmarker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D047BF21CD8FC3800B51152 /* Benchmarker.swift */; }; 11 | 6D047BF41CD8FC3800B51152 /* Benchmarker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D047BF21CD8FC3800B51152 /* Benchmarker.swift */; }; 12 | 6D047BF51CD8FC3800B51152 /* Benchmarker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D047BF21CD8FC3800B51152 /* Benchmarker.swift */; }; 13 | 6D047BF61CD8FC3800B51152 /* Benchmarker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D047BF21CD8FC3800B51152 /* Benchmarker.swift */; }; 14 | 6D7C681A1C89FBFC005782C9 /* Log.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D7C68101C89FBFC005782C9 /* Log.framework */; }; 15 | 6D7C68671C8A0596005782C9 /* Log.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D06F6CA1C189C4B0010110E /* Log.h */; settings = {ATTRIBUTES = (Public, ); }; }; 16 | 6D7C68681C8A0597005782C9 /* Log.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D06F6CA1C189C4B0010110E /* Log.h */; settings = {ATTRIBUTES = (Public, ); }; }; 17 | 6D7C68691C8A0599005782C9 /* Log.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D06F6CA1C189C4B0010110E /* Log.h */; settings = {ATTRIBUTES = (Public, ); }; }; 18 | 6D7C686A1C8A059B005782C9 /* Log.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D06F6CA1C189C4B0010110E /* Log.h */; settings = {ATTRIBUTES = (Public, ); }; }; 19 | 6D7C686B1C8A097F005782C9 /* Formatters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DFA5CC61C21C77F003990E7 /* Formatters.swift */; }; 20 | 6D7C686C1C8A097F005782C9 /* Themes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DA3FDEE1C1F921700602510 /* Themes.swift */; }; 21 | 6D7C686D1C8A097F005782C9 /* Formatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DA3FDEA1C1F843600602510 /* Formatter.swift */; }; 22 | 6D7C686E1C8A097F005782C9 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D06F6E11C189C5B0010110E /* Logger.swift */; }; 23 | 6D7C686F1C8A097F005782C9 /* Theme.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DFA5CC41C21C72A003990E7 /* Theme.swift */; }; 24 | 6D7C68701C8A0981005782C9 /* Formatters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DFA5CC61C21C77F003990E7 /* Formatters.swift */; }; 25 | 6D7C68711C8A0981005782C9 /* Themes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DA3FDEE1C1F921700602510 /* Themes.swift */; }; 26 | 6D7C68721C8A0981005782C9 /* Formatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DA3FDEA1C1F843600602510 /* Formatter.swift */; }; 27 | 6D7C68731C8A0981005782C9 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D06F6E11C189C5B0010110E /* Logger.swift */; }; 28 | 6D7C68741C8A0981005782C9 /* Theme.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DFA5CC41C21C72A003990E7 /* Theme.swift */; }; 29 | 6D7C68751C8A0982005782C9 /* Formatters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DFA5CC61C21C77F003990E7 /* Formatters.swift */; }; 30 | 6D7C68761C8A0982005782C9 /* Themes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DA3FDEE1C1F921700602510 /* Themes.swift */; }; 31 | 6D7C68771C8A0982005782C9 /* Formatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DA3FDEA1C1F843600602510 /* Formatter.swift */; }; 32 | 6D7C68781C8A0982005782C9 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D06F6E11C189C5B0010110E /* Logger.swift */; }; 33 | 6D7C68791C8A0982005782C9 /* Theme.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DFA5CC41C21C72A003990E7 /* Theme.swift */; }; 34 | 6D7C687A1C8A0983005782C9 /* Formatters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DFA5CC61C21C77F003990E7 /* Formatters.swift */; }; 35 | 6D7C687B1C8A0983005782C9 /* Themes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DA3FDEE1C1F921700602510 /* Themes.swift */; }; 36 | 6D7C687C1C8A0983005782C9 /* Formatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DA3FDEA1C1F843600602510 /* Formatter.swift */; }; 37 | 6D7C687D1C8A0983005782C9 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D06F6E11C189C5B0010110E /* Logger.swift */; }; 38 | 6D7C687E1C8A0983005782C9 /* Theme.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DFA5CC41C21C72A003990E7 /* Theme.swift */; }; 39 | 6D7C68F21C8C657D005782C9 /* LogTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D06F6D61C189C4C0010110E /* LogTests.swift */; }; 40 | 6D7C68F31C8C657E005782C9 /* LogTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D06F6D61C189C4C0010110E /* LogTests.swift */; }; 41 | 6D7C68F41C8C6580005782C9 /* LogTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D06F6D61C189C4C0010110E /* LogTests.swift */; }; 42 | 6DACCA271C89F4C2001B63D9 /* Log.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DACCA1D1C89F4C2001B63D9 /* Log.framework */; }; 43 | 6DACCA441C89F89E001B63D9 /* Log.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DACCA3A1C89F89D001B63D9 /* Log.framework */; }; 44 | 6DE69DF51CDE80E100024624 /* Utilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DE69DF41CDE80E100024624 /* Utilities.swift */; }; 45 | 6DE69DF61CDE815000024624 /* Utilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DE69DF41CDE80E100024624 /* Utilities.swift */; }; 46 | 6DE69DF71CDE815100024624 /* Utilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DE69DF41CDE80E100024624 /* Utilities.swift */; }; 47 | 6DE69DF81CDE815300024624 /* Utilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DE69DF41CDE80E100024624 /* Utilities.swift */; }; 48 | /* End PBXBuildFile section */ 49 | 50 | /* Begin PBXContainerItemProxy section */ 51 | 6D7C681B1C89FBFC005782C9 /* PBXContainerItemProxy */ = { 52 | isa = PBXContainerItemProxy; 53 | containerPortal = 6D06F6BE1C189C4B0010110E /* Project object */; 54 | proxyType = 1; 55 | remoteGlobalIDString = 6D7C680F1C89FBFC005782C9; 56 | remoteInfo = "Log tvOS"; 57 | }; 58 | 6DACCA281C89F4C2001B63D9 /* PBXContainerItemProxy */ = { 59 | isa = PBXContainerItemProxy; 60 | containerPortal = 6D06F6BE1C189C4B0010110E /* Project object */; 61 | proxyType = 1; 62 | remoteGlobalIDString = 6DACCA1C1C89F4C2001B63D9; 63 | remoteInfo = "Log OSX"; 64 | }; 65 | 6DACCA451C89F89E001B63D9 /* PBXContainerItemProxy */ = { 66 | isa = PBXContainerItemProxy; 67 | containerPortal = 6D06F6BE1C189C4B0010110E /* Project object */; 68 | proxyType = 1; 69 | remoteGlobalIDString = 6DACCA391C89F89D001B63D9; 70 | remoteInfo = "Log iOS"; 71 | }; 72 | /* End PBXContainerItemProxy section */ 73 | 74 | /* Begin PBXFileReference section */ 75 | 6D047BF21CD8FC3800B51152 /* Benchmarker.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Benchmarker.swift; sourceTree = ""; }; 76 | 6D06F6CA1C189C4B0010110E /* Log.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Log.h; sourceTree = ""; }; 77 | 6D06F6CC1C189C4B0010110E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 78 | 6D06F6D61C189C4C0010110E /* LogTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogTests.swift; sourceTree = ""; }; 79 | 6D06F6D81C189C4C0010110E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 80 | 6D06F6E11C189C5B0010110E /* Logger.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Logger.swift; sourceTree = ""; }; 81 | 6D7C68031C89FBAB005782C9 /* Log.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Log.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 82 | 6D7C68101C89FBFC005782C9 /* Log.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Log.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 83 | 6D7C68191C89FBFC005782C9 /* Log tvOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Log tvOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 84 | 6DA3FDEA1C1F843600602510 /* Formatter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Formatter.swift; sourceTree = ""; }; 85 | 6DA3FDEE1C1F921700602510 /* Themes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Themes.swift; sourceTree = ""; }; 86 | 6DACCA1D1C89F4C2001B63D9 /* Log.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Log.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 87 | 6DACCA261C89F4C2001B63D9 /* Log OSX Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Log OSX Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 88 | 6DACCA3A1C89F89D001B63D9 /* Log.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Log.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 89 | 6DACCA431C89F89E001B63D9 /* Log iOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Log iOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 90 | 6DE69DF41CDE80E100024624 /* Utilities.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Utilities.swift; sourceTree = ""; }; 91 | 6DFA5CC41C21C72A003990E7 /* Theme.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Theme.swift; sourceTree = ""; }; 92 | 6DFA5CC61C21C77F003990E7 /* Formatters.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Formatters.swift; sourceTree = ""; }; 93 | /* End PBXFileReference section */ 94 | 95 | /* Begin PBXFrameworksBuildPhase section */ 96 | 6D7C67FF1C89FBAB005782C9 /* Frameworks */ = { 97 | isa = PBXFrameworksBuildPhase; 98 | buildActionMask = 2147483647; 99 | files = ( 100 | ); 101 | runOnlyForDeploymentPostprocessing = 0; 102 | }; 103 | 6D7C680C1C89FBFC005782C9 /* Frameworks */ = { 104 | isa = PBXFrameworksBuildPhase; 105 | buildActionMask = 2147483647; 106 | files = ( 107 | ); 108 | runOnlyForDeploymentPostprocessing = 0; 109 | }; 110 | 6D7C68161C89FBFC005782C9 /* Frameworks */ = { 111 | isa = PBXFrameworksBuildPhase; 112 | buildActionMask = 2147483647; 113 | files = ( 114 | 6D7C681A1C89FBFC005782C9 /* Log.framework in Frameworks */, 115 | ); 116 | runOnlyForDeploymentPostprocessing = 0; 117 | }; 118 | 6DACCA191C89F4C2001B63D9 /* Frameworks */ = { 119 | isa = PBXFrameworksBuildPhase; 120 | buildActionMask = 2147483647; 121 | files = ( 122 | ); 123 | runOnlyForDeploymentPostprocessing = 0; 124 | }; 125 | 6DACCA231C89F4C2001B63D9 /* Frameworks */ = { 126 | isa = PBXFrameworksBuildPhase; 127 | buildActionMask = 2147483647; 128 | files = ( 129 | 6DACCA271C89F4C2001B63D9 /* Log.framework in Frameworks */, 130 | ); 131 | runOnlyForDeploymentPostprocessing = 0; 132 | }; 133 | 6DACCA361C89F89D001B63D9 /* Frameworks */ = { 134 | isa = PBXFrameworksBuildPhase; 135 | buildActionMask = 2147483647; 136 | files = ( 137 | ); 138 | runOnlyForDeploymentPostprocessing = 0; 139 | }; 140 | 6DACCA401C89F89E001B63D9 /* Frameworks */ = { 141 | isa = PBXFrameworksBuildPhase; 142 | buildActionMask = 2147483647; 143 | files = ( 144 | 6DACCA441C89F89E001B63D9 /* Log.framework in Frameworks */, 145 | ); 146 | runOnlyForDeploymentPostprocessing = 0; 147 | }; 148 | /* End PBXFrameworksBuildPhase section */ 149 | 150 | /* Begin PBXGroup section */ 151 | 6D06F6BD1C189C4B0010110E = { 152 | isa = PBXGroup; 153 | children = ( 154 | 6D06F6C81C189C4B0010110E /* Products */, 155 | 6D06F6C91C189C4B0010110E /* Source */, 156 | 6D06F6D51C189C4C0010110E /* Tests */, 157 | ); 158 | sourceTree = ""; 159 | }; 160 | 6D06F6C81C189C4B0010110E /* Products */ = { 161 | isa = PBXGroup; 162 | children = ( 163 | 6DACCA1D1C89F4C2001B63D9 /* Log.framework */, 164 | 6DACCA261C89F4C2001B63D9 /* Log OSX Tests.xctest */, 165 | 6DACCA3A1C89F89D001B63D9 /* Log.framework */, 166 | 6DACCA431C89F89E001B63D9 /* Log iOS Tests.xctest */, 167 | 6D7C68031C89FBAB005782C9 /* Log.framework */, 168 | 6D7C68101C89FBFC005782C9 /* Log.framework */, 169 | 6D7C68191C89FBFC005782C9 /* Log tvOS Tests.xctest */, 170 | ); 171 | name = Products; 172 | sourceTree = ""; 173 | }; 174 | 6D06F6C91C189C4B0010110E /* Source */ = { 175 | isa = PBXGroup; 176 | children = ( 177 | 6DFA5CC81C21C79F003990E7 /* Extensions */, 178 | 6DACCA341C89F697001B63D9 /* Supporting Files */, 179 | 6D047BF21CD8FC3800B51152 /* Benchmarker.swift */, 180 | 6DA3FDEA1C1F843600602510 /* Formatter.swift */, 181 | 6D06F6E11C189C5B0010110E /* Logger.swift */, 182 | 6DFA5CC41C21C72A003990E7 /* Theme.swift */, 183 | ); 184 | path = Source; 185 | sourceTree = ""; 186 | }; 187 | 6D06F6D51C189C4C0010110E /* Tests */ = { 188 | isa = PBXGroup; 189 | children = ( 190 | 6D7C68271C89FDCE005782C9 /* Supporting Files */, 191 | 6D06F6D61C189C4C0010110E /* LogTests.swift */, 192 | ); 193 | path = Tests; 194 | sourceTree = ""; 195 | }; 196 | 6D7C68271C89FDCE005782C9 /* Supporting Files */ = { 197 | isa = PBXGroup; 198 | children = ( 199 | 6D06F6D81C189C4C0010110E /* Info.plist */, 200 | ); 201 | path = "Supporting Files"; 202 | sourceTree = ""; 203 | }; 204 | 6DACCA341C89F697001B63D9 /* Supporting Files */ = { 205 | isa = PBXGroup; 206 | children = ( 207 | 6D06F6CC1C189C4B0010110E /* Info.plist */, 208 | 6D06F6CA1C189C4B0010110E /* Log.h */, 209 | 6DE69DF41CDE80E100024624 /* Utilities.swift */, 210 | ); 211 | path = "Supporting Files"; 212 | sourceTree = ""; 213 | }; 214 | 6DFA5CC81C21C79F003990E7 /* Extensions */ = { 215 | isa = PBXGroup; 216 | children = ( 217 | 6DFA5CC61C21C77F003990E7 /* Formatters.swift */, 218 | 6DA3FDEE1C1F921700602510 /* Themes.swift */, 219 | ); 220 | path = Extensions; 221 | sourceTree = ""; 222 | }; 223 | /* End PBXGroup section */ 224 | 225 | /* Begin PBXHeadersBuildPhase section */ 226 | 6D7C68001C89FBAB005782C9 /* Headers */ = { 227 | isa = PBXHeadersBuildPhase; 228 | buildActionMask = 2147483647; 229 | files = ( 230 | 6D7C686A1C8A059B005782C9 /* Log.h in Headers */, 231 | ); 232 | runOnlyForDeploymentPostprocessing = 0; 233 | }; 234 | 6D7C680D1C89FBFC005782C9 /* Headers */ = { 235 | isa = PBXHeadersBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | 6D7C68691C8A0599005782C9 /* Log.h in Headers */, 239 | ); 240 | runOnlyForDeploymentPostprocessing = 0; 241 | }; 242 | 6DACCA1A1C89F4C2001B63D9 /* Headers */ = { 243 | isa = PBXHeadersBuildPhase; 244 | buildActionMask = 2147483647; 245 | files = ( 246 | 6D7C68681C8A0597005782C9 /* Log.h in Headers */, 247 | ); 248 | runOnlyForDeploymentPostprocessing = 0; 249 | }; 250 | 6DACCA371C89F89D001B63D9 /* Headers */ = { 251 | isa = PBXHeadersBuildPhase; 252 | buildActionMask = 2147483647; 253 | files = ( 254 | 6D7C68671C8A0596005782C9 /* Log.h in Headers */, 255 | ); 256 | runOnlyForDeploymentPostprocessing = 0; 257 | }; 258 | /* End PBXHeadersBuildPhase section */ 259 | 260 | /* Begin PBXNativeTarget section */ 261 | 6D7C68021C89FBAB005782C9 /* Log watchOS */ = { 262 | isa = PBXNativeTarget; 263 | buildConfigurationList = 6D7C68081C89FBAB005782C9 /* Build configuration list for PBXNativeTarget "Log watchOS" */; 264 | buildPhases = ( 265 | 6D7C67FE1C89FBAB005782C9 /* Sources */, 266 | 6D7C67FF1C89FBAB005782C9 /* Frameworks */, 267 | 6D7C68001C89FBAB005782C9 /* Headers */, 268 | 6D7C68011C89FBAB005782C9 /* Resources */, 269 | ); 270 | buildRules = ( 271 | ); 272 | dependencies = ( 273 | ); 274 | name = "Log watchOS"; 275 | productName = "Log watchOS"; 276 | productReference = 6D7C68031C89FBAB005782C9 /* Log.framework */; 277 | productType = "com.apple.product-type.framework"; 278 | }; 279 | 6D7C680F1C89FBFC005782C9 /* Log tvOS */ = { 280 | isa = PBXNativeTarget; 281 | buildConfigurationList = 6D7C68211C89FBFC005782C9 /* Build configuration list for PBXNativeTarget "Log tvOS" */; 282 | buildPhases = ( 283 | 6D7C680B1C89FBFC005782C9 /* Sources */, 284 | 6D7C680C1C89FBFC005782C9 /* Frameworks */, 285 | 6D7C680D1C89FBFC005782C9 /* Headers */, 286 | 6D7C680E1C89FBFC005782C9 /* Resources */, 287 | ); 288 | buildRules = ( 289 | ); 290 | dependencies = ( 291 | ); 292 | name = "Log tvOS"; 293 | productName = "Log tvOS"; 294 | productReference = 6D7C68101C89FBFC005782C9 /* Log.framework */; 295 | productType = "com.apple.product-type.framework"; 296 | }; 297 | 6D7C68181C89FBFC005782C9 /* Log tvOS Tests */ = { 298 | isa = PBXNativeTarget; 299 | buildConfigurationList = 6D7C68241C89FBFC005782C9 /* Build configuration list for PBXNativeTarget "Log tvOS Tests" */; 300 | buildPhases = ( 301 | 6D7C68151C89FBFC005782C9 /* Sources */, 302 | 6D7C68161C89FBFC005782C9 /* Frameworks */, 303 | 6D7C68171C89FBFC005782C9 /* Resources */, 304 | ); 305 | buildRules = ( 306 | ); 307 | dependencies = ( 308 | 6D7C681C1C89FBFC005782C9 /* PBXTargetDependency */, 309 | ); 310 | name = "Log tvOS Tests"; 311 | productName = "Log tvOSTests"; 312 | productReference = 6D7C68191C89FBFC005782C9 /* Log tvOS Tests.xctest */; 313 | productType = "com.apple.product-type.bundle.unit-test"; 314 | }; 315 | 6DACCA1C1C89F4C2001B63D9 /* Log OSX */ = { 316 | isa = PBXNativeTarget; 317 | buildConfigurationList = 6DACCA321C89F4C2001B63D9 /* Build configuration list for PBXNativeTarget "Log OSX" */; 318 | buildPhases = ( 319 | 6DACCA181C89F4C2001B63D9 /* Sources */, 320 | 6DACCA191C89F4C2001B63D9 /* Frameworks */, 321 | 6DACCA1A1C89F4C2001B63D9 /* Headers */, 322 | 6DACCA1B1C89F4C2001B63D9 /* Resources */, 323 | ); 324 | buildRules = ( 325 | ); 326 | dependencies = ( 327 | ); 328 | name = "Log OSX"; 329 | productName = "Log OSX"; 330 | productReference = 6DACCA1D1C89F4C2001B63D9 /* Log.framework */; 331 | productType = "com.apple.product-type.framework"; 332 | }; 333 | 6DACCA251C89F4C2001B63D9 /* Log OSX Tests */ = { 334 | isa = PBXNativeTarget; 335 | buildConfigurationList = 6DACCA331C89F4C2001B63D9 /* Build configuration list for PBXNativeTarget "Log OSX Tests" */; 336 | buildPhases = ( 337 | 6DACCA221C89F4C2001B63D9 /* Sources */, 338 | 6DACCA231C89F4C2001B63D9 /* Frameworks */, 339 | 6DACCA241C89F4C2001B63D9 /* Resources */, 340 | ); 341 | buildRules = ( 342 | ); 343 | dependencies = ( 344 | 6DACCA291C89F4C2001B63D9 /* PBXTargetDependency */, 345 | ); 346 | name = "Log OSX Tests"; 347 | productName = "Log OSXTests"; 348 | productReference = 6DACCA261C89F4C2001B63D9 /* Log OSX Tests.xctest */; 349 | productType = "com.apple.product-type.bundle.unit-test"; 350 | }; 351 | 6DACCA391C89F89D001B63D9 /* Log iOS */ = { 352 | isa = PBXNativeTarget; 353 | buildConfigurationList = 6DACCA4B1C89F89E001B63D9 /* Build configuration list for PBXNativeTarget "Log iOS" */; 354 | buildPhases = ( 355 | 6DACCA351C89F89D001B63D9 /* Sources */, 356 | 6DACCA361C89F89D001B63D9 /* Frameworks */, 357 | 6DACCA371C89F89D001B63D9 /* Headers */, 358 | 6DACCA381C89F89D001B63D9 /* Resources */, 359 | ); 360 | buildRules = ( 361 | ); 362 | dependencies = ( 363 | ); 364 | name = "Log iOS"; 365 | productName = "Log iOS"; 366 | productReference = 6DACCA3A1C89F89D001B63D9 /* Log.framework */; 367 | productType = "com.apple.product-type.framework"; 368 | }; 369 | 6DACCA421C89F89E001B63D9 /* Log iOS Tests */ = { 370 | isa = PBXNativeTarget; 371 | buildConfigurationList = 6DACCA4E1C89F89E001B63D9 /* Build configuration list for PBXNativeTarget "Log iOS Tests" */; 372 | buildPhases = ( 373 | 6DACCA3F1C89F89E001B63D9 /* Sources */, 374 | 6DACCA401C89F89E001B63D9 /* Frameworks */, 375 | 6DACCA411C89F89E001B63D9 /* Resources */, 376 | ); 377 | buildRules = ( 378 | ); 379 | dependencies = ( 380 | 6DACCA461C89F89E001B63D9 /* PBXTargetDependency */, 381 | ); 382 | name = "Log iOS Tests"; 383 | productName = "Log iOSTests"; 384 | productReference = 6DACCA431C89F89E001B63D9 /* Log iOS Tests.xctest */; 385 | productType = "com.apple.product-type.bundle.unit-test"; 386 | }; 387 | /* End PBXNativeTarget section */ 388 | 389 | /* Begin PBXProject section */ 390 | 6D06F6BE1C189C4B0010110E /* Project object */ = { 391 | isa = PBXProject; 392 | attributes = { 393 | LastSwiftUpdateCheck = 0720; 394 | LastUpgradeCheck = 1030; 395 | ORGANIZATIONNAME = delba; 396 | TargetAttributes = { 397 | 6D7C68021C89FBAB005782C9 = { 398 | CreatedOnToolsVersion = 7.2; 399 | }; 400 | 6D7C680F1C89FBFC005782C9 = { 401 | CreatedOnToolsVersion = 7.2; 402 | }; 403 | 6D7C68181C89FBFC005782C9 = { 404 | CreatedOnToolsVersion = 7.2; 405 | }; 406 | 6DACCA1C1C89F4C2001B63D9 = { 407 | CreatedOnToolsVersion = 7.2; 408 | }; 409 | 6DACCA251C89F4C2001B63D9 = { 410 | CreatedOnToolsVersion = 7.2; 411 | }; 412 | 6DACCA391C89F89D001B63D9 = { 413 | CreatedOnToolsVersion = 7.2; 414 | LastSwiftMigration = 0800; 415 | }; 416 | 6DACCA421C89F89E001B63D9 = { 417 | CreatedOnToolsVersion = 7.2; 418 | LastSwiftMigration = 0800; 419 | }; 420 | }; 421 | }; 422 | buildConfigurationList = 6D06F6C11C189C4B0010110E /* Build configuration list for PBXProject "Log" */; 423 | compatibilityVersion = "Xcode 3.2"; 424 | developmentRegion = en; 425 | hasScannedForEncodings = 0; 426 | knownRegions = ( 427 | en, 428 | Base, 429 | ); 430 | mainGroup = 6D06F6BD1C189C4B0010110E; 431 | productRefGroup = 6D06F6C81C189C4B0010110E /* Products */; 432 | projectDirPath = ""; 433 | projectRoot = ""; 434 | targets = ( 435 | 6DACCA391C89F89D001B63D9 /* Log iOS */, 436 | 6DACCA421C89F89E001B63D9 /* Log iOS Tests */, 437 | 6DACCA1C1C89F4C2001B63D9 /* Log OSX */, 438 | 6DACCA251C89F4C2001B63D9 /* Log OSX Tests */, 439 | 6D7C680F1C89FBFC005782C9 /* Log tvOS */, 440 | 6D7C68181C89FBFC005782C9 /* Log tvOS Tests */, 441 | 6D7C68021C89FBAB005782C9 /* Log watchOS */, 442 | ); 443 | }; 444 | /* End PBXProject section */ 445 | 446 | /* Begin PBXResourcesBuildPhase section */ 447 | 6D7C68011C89FBAB005782C9 /* Resources */ = { 448 | isa = PBXResourcesBuildPhase; 449 | buildActionMask = 2147483647; 450 | files = ( 451 | ); 452 | runOnlyForDeploymentPostprocessing = 0; 453 | }; 454 | 6D7C680E1C89FBFC005782C9 /* Resources */ = { 455 | isa = PBXResourcesBuildPhase; 456 | buildActionMask = 2147483647; 457 | files = ( 458 | ); 459 | runOnlyForDeploymentPostprocessing = 0; 460 | }; 461 | 6D7C68171C89FBFC005782C9 /* Resources */ = { 462 | isa = PBXResourcesBuildPhase; 463 | buildActionMask = 2147483647; 464 | files = ( 465 | ); 466 | runOnlyForDeploymentPostprocessing = 0; 467 | }; 468 | 6DACCA1B1C89F4C2001B63D9 /* Resources */ = { 469 | isa = PBXResourcesBuildPhase; 470 | buildActionMask = 2147483647; 471 | files = ( 472 | ); 473 | runOnlyForDeploymentPostprocessing = 0; 474 | }; 475 | 6DACCA241C89F4C2001B63D9 /* Resources */ = { 476 | isa = PBXResourcesBuildPhase; 477 | buildActionMask = 2147483647; 478 | files = ( 479 | ); 480 | runOnlyForDeploymentPostprocessing = 0; 481 | }; 482 | 6DACCA381C89F89D001B63D9 /* Resources */ = { 483 | isa = PBXResourcesBuildPhase; 484 | buildActionMask = 2147483647; 485 | files = ( 486 | ); 487 | runOnlyForDeploymentPostprocessing = 0; 488 | }; 489 | 6DACCA411C89F89E001B63D9 /* Resources */ = { 490 | isa = PBXResourcesBuildPhase; 491 | buildActionMask = 2147483647; 492 | files = ( 493 | ); 494 | runOnlyForDeploymentPostprocessing = 0; 495 | }; 496 | /* End PBXResourcesBuildPhase section */ 497 | 498 | /* Begin PBXSourcesBuildPhase section */ 499 | 6D7C67FE1C89FBAB005782C9 /* Sources */ = { 500 | isa = PBXSourcesBuildPhase; 501 | buildActionMask = 2147483647; 502 | files = ( 503 | 6D7C687C1C8A0983005782C9 /* Formatter.swift in Sources */, 504 | 6D7C687A1C8A0983005782C9 /* Formatters.swift in Sources */, 505 | 6DE69DF81CDE815300024624 /* Utilities.swift in Sources */, 506 | 6D7C687E1C8A0983005782C9 /* Theme.swift in Sources */, 507 | 6D7C687B1C8A0983005782C9 /* Themes.swift in Sources */, 508 | 6D047BF61CD8FC3800B51152 /* Benchmarker.swift in Sources */, 509 | 6D7C687D1C8A0983005782C9 /* Logger.swift in Sources */, 510 | ); 511 | runOnlyForDeploymentPostprocessing = 0; 512 | }; 513 | 6D7C680B1C89FBFC005782C9 /* Sources */ = { 514 | isa = PBXSourcesBuildPhase; 515 | buildActionMask = 2147483647; 516 | files = ( 517 | 6D7C68771C8A0982005782C9 /* Formatter.swift in Sources */, 518 | 6D7C68751C8A0982005782C9 /* Formatters.swift in Sources */, 519 | 6DE69DF71CDE815100024624 /* Utilities.swift in Sources */, 520 | 6D7C68791C8A0982005782C9 /* Theme.swift in Sources */, 521 | 6D7C68761C8A0982005782C9 /* Themes.swift in Sources */, 522 | 6D047BF51CD8FC3800B51152 /* Benchmarker.swift in Sources */, 523 | 6D7C68781C8A0982005782C9 /* Logger.swift in Sources */, 524 | ); 525 | runOnlyForDeploymentPostprocessing = 0; 526 | }; 527 | 6D7C68151C89FBFC005782C9 /* Sources */ = { 528 | isa = PBXSourcesBuildPhase; 529 | buildActionMask = 2147483647; 530 | files = ( 531 | 6D7C68F41C8C6580005782C9 /* LogTests.swift in Sources */, 532 | ); 533 | runOnlyForDeploymentPostprocessing = 0; 534 | }; 535 | 6DACCA181C89F4C2001B63D9 /* Sources */ = { 536 | isa = PBXSourcesBuildPhase; 537 | buildActionMask = 2147483647; 538 | files = ( 539 | 6D7C68721C8A0981005782C9 /* Formatter.swift in Sources */, 540 | 6D7C68701C8A0981005782C9 /* Formatters.swift in Sources */, 541 | 6DE69DF61CDE815000024624 /* Utilities.swift in Sources */, 542 | 6D7C68741C8A0981005782C9 /* Theme.swift in Sources */, 543 | 6D7C68711C8A0981005782C9 /* Themes.swift in Sources */, 544 | 6D047BF41CD8FC3800B51152 /* Benchmarker.swift in Sources */, 545 | 6D7C68731C8A0981005782C9 /* Logger.swift in Sources */, 546 | ); 547 | runOnlyForDeploymentPostprocessing = 0; 548 | }; 549 | 6DACCA221C89F4C2001B63D9 /* Sources */ = { 550 | isa = PBXSourcesBuildPhase; 551 | buildActionMask = 2147483647; 552 | files = ( 553 | 6D7C68F31C8C657E005782C9 /* LogTests.swift in Sources */, 554 | ); 555 | runOnlyForDeploymentPostprocessing = 0; 556 | }; 557 | 6DACCA351C89F89D001B63D9 /* Sources */ = { 558 | isa = PBXSourcesBuildPhase; 559 | buildActionMask = 2147483647; 560 | files = ( 561 | 6D7C686D1C8A097F005782C9 /* Formatter.swift in Sources */, 562 | 6D7C686B1C8A097F005782C9 /* Formatters.swift in Sources */, 563 | 6DE69DF51CDE80E100024624 /* Utilities.swift in Sources */, 564 | 6D7C686F1C8A097F005782C9 /* Theme.swift in Sources */, 565 | 6D7C686C1C8A097F005782C9 /* Themes.swift in Sources */, 566 | 6D047BF31CD8FC3800B51152 /* Benchmarker.swift in Sources */, 567 | 6D7C686E1C8A097F005782C9 /* Logger.swift in Sources */, 568 | ); 569 | runOnlyForDeploymentPostprocessing = 0; 570 | }; 571 | 6DACCA3F1C89F89E001B63D9 /* Sources */ = { 572 | isa = PBXSourcesBuildPhase; 573 | buildActionMask = 2147483647; 574 | files = ( 575 | 6D7C68F21C8C657D005782C9 /* LogTests.swift in Sources */, 576 | ); 577 | runOnlyForDeploymentPostprocessing = 0; 578 | }; 579 | /* End PBXSourcesBuildPhase section */ 580 | 581 | /* Begin PBXTargetDependency section */ 582 | 6D7C681C1C89FBFC005782C9 /* PBXTargetDependency */ = { 583 | isa = PBXTargetDependency; 584 | target = 6D7C680F1C89FBFC005782C9 /* Log tvOS */; 585 | targetProxy = 6D7C681B1C89FBFC005782C9 /* PBXContainerItemProxy */; 586 | }; 587 | 6DACCA291C89F4C2001B63D9 /* PBXTargetDependency */ = { 588 | isa = PBXTargetDependency; 589 | target = 6DACCA1C1C89F4C2001B63D9 /* Log OSX */; 590 | targetProxy = 6DACCA281C89F4C2001B63D9 /* PBXContainerItemProxy */; 591 | }; 592 | 6DACCA461C89F89E001B63D9 /* PBXTargetDependency */ = { 593 | isa = PBXTargetDependency; 594 | target = 6DACCA391C89F89D001B63D9 /* Log iOS */; 595 | targetProxy = 6DACCA451C89F89E001B63D9 /* PBXContainerItemProxy */; 596 | }; 597 | /* End PBXTargetDependency section */ 598 | 599 | /* Begin XCBuildConfiguration section */ 600 | 6D06F6D91C189C4C0010110E /* Debug */ = { 601 | isa = XCBuildConfiguration; 602 | buildSettings = { 603 | ALWAYS_SEARCH_USER_PATHS = NO; 604 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 605 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 606 | CLANG_CXX_LIBRARY = "libc++"; 607 | CLANG_ENABLE_MODULES = YES; 608 | CLANG_ENABLE_OBJC_ARC = YES; 609 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 610 | CLANG_WARN_BOOL_CONVERSION = YES; 611 | CLANG_WARN_COMMA = YES; 612 | CLANG_WARN_CONSTANT_CONVERSION = YES; 613 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 614 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 615 | CLANG_WARN_EMPTY_BODY = YES; 616 | CLANG_WARN_ENUM_CONVERSION = YES; 617 | CLANG_WARN_INFINITE_RECURSION = YES; 618 | CLANG_WARN_INT_CONVERSION = YES; 619 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 620 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 621 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 622 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 623 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 624 | CLANG_WARN_STRICT_PROTOTYPES = YES; 625 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 626 | CLANG_WARN_UNREACHABLE_CODE = YES; 627 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 628 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 629 | COPY_PHASE_STRIP = NO; 630 | CURRENT_PROJECT_VERSION = 1; 631 | DEBUG_INFORMATION_FORMAT = dwarf; 632 | ENABLE_STRICT_OBJC_MSGSEND = YES; 633 | ENABLE_TESTABILITY = YES; 634 | GCC_C_LANGUAGE_STANDARD = gnu99; 635 | GCC_DYNAMIC_NO_PIC = NO; 636 | GCC_NO_COMMON_BLOCKS = YES; 637 | GCC_OPTIMIZATION_LEVEL = 0; 638 | GCC_PREPROCESSOR_DEFINITIONS = ( 639 | "DEBUG=1", 640 | "$(inherited)", 641 | ); 642 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 643 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 644 | GCC_WARN_UNDECLARED_SELECTOR = YES; 645 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 646 | GCC_WARN_UNUSED_FUNCTION = YES; 647 | GCC_WARN_UNUSED_VARIABLE = YES; 648 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 649 | MACOSX_DEPLOYMENT_TARGET = 10.9; 650 | MTL_ENABLE_DEBUG_INFO = YES; 651 | ONLY_ACTIVE_ARCH = YES; 652 | SDKROOT = iphoneos; 653 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 654 | TARGETED_DEVICE_FAMILY = "1,2"; 655 | VERSIONING_SYSTEM = "apple-generic"; 656 | VERSION_INFO_PREFIX = ""; 657 | }; 658 | name = Debug; 659 | }; 660 | 6D06F6DA1C189C4C0010110E /* Release */ = { 661 | isa = XCBuildConfiguration; 662 | buildSettings = { 663 | ALWAYS_SEARCH_USER_PATHS = NO; 664 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 665 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 666 | CLANG_CXX_LIBRARY = "libc++"; 667 | CLANG_ENABLE_MODULES = YES; 668 | CLANG_ENABLE_OBJC_ARC = YES; 669 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 670 | CLANG_WARN_BOOL_CONVERSION = YES; 671 | CLANG_WARN_COMMA = YES; 672 | CLANG_WARN_CONSTANT_CONVERSION = YES; 673 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 674 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 675 | CLANG_WARN_EMPTY_BODY = YES; 676 | CLANG_WARN_ENUM_CONVERSION = YES; 677 | CLANG_WARN_INFINITE_RECURSION = YES; 678 | CLANG_WARN_INT_CONVERSION = YES; 679 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 680 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 681 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 682 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 683 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 684 | CLANG_WARN_STRICT_PROTOTYPES = YES; 685 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 686 | CLANG_WARN_UNREACHABLE_CODE = YES; 687 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 688 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 689 | COPY_PHASE_STRIP = NO; 690 | CURRENT_PROJECT_VERSION = 1; 691 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 692 | ENABLE_NS_ASSERTIONS = NO; 693 | ENABLE_STRICT_OBJC_MSGSEND = YES; 694 | GCC_C_LANGUAGE_STANDARD = gnu99; 695 | GCC_NO_COMMON_BLOCKS = YES; 696 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 697 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 698 | GCC_WARN_UNDECLARED_SELECTOR = YES; 699 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 700 | GCC_WARN_UNUSED_FUNCTION = YES; 701 | GCC_WARN_UNUSED_VARIABLE = YES; 702 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 703 | MACOSX_DEPLOYMENT_TARGET = 10.9; 704 | MTL_ENABLE_DEBUG_INFO = NO; 705 | SDKROOT = iphoneos; 706 | TARGETED_DEVICE_FAMILY = "1,2"; 707 | VALIDATE_PRODUCT = YES; 708 | VERSIONING_SYSTEM = "apple-generic"; 709 | VERSION_INFO_PREFIX = ""; 710 | }; 711 | name = Release; 712 | }; 713 | 6D7C68091C89FBAB005782C9 /* Debug */ = { 714 | isa = XCBuildConfiguration; 715 | buildSettings = { 716 | APPLICATION_EXTENSION_API_ONLY = YES; 717 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 718 | DEFINES_MODULE = YES; 719 | DYLIB_COMPATIBILITY_VERSION = 1; 720 | DYLIB_CURRENT_VERSION = 1; 721 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 722 | INFOPLIST_FILE = "$(SRCROOT)/Source/Supporting Files/Info.plist"; 723 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 724 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 725 | MODULEMAP_FILE = ""; 726 | PRODUCT_BUNDLE_IDENTIFIER = "io.delba.Log-watchOS"; 727 | PRODUCT_NAME = Log; 728 | SDKROOT = watchos; 729 | SKIP_INSTALL = YES; 730 | SWIFT_VERSION = 5.0; 731 | TARGETED_DEVICE_FAMILY = 4; 732 | WATCHOS_DEPLOYMENT_TARGET = 2.1; 733 | }; 734 | name = Debug; 735 | }; 736 | 6D7C680A1C89FBAB005782C9 /* Release */ = { 737 | isa = XCBuildConfiguration; 738 | buildSettings = { 739 | APPLICATION_EXTENSION_API_ONLY = YES; 740 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 741 | DEFINES_MODULE = YES; 742 | DYLIB_COMPATIBILITY_VERSION = 1; 743 | DYLIB_CURRENT_VERSION = 1; 744 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 745 | INFOPLIST_FILE = "$(SRCROOT)/Source/Supporting Files/Info.plist"; 746 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 747 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 748 | MODULEMAP_FILE = ""; 749 | PRODUCT_BUNDLE_IDENTIFIER = "io.delba.Log-watchOS"; 750 | PRODUCT_NAME = Log; 751 | SDKROOT = watchos; 752 | SKIP_INSTALL = YES; 753 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 754 | SWIFT_VERSION = 5.0; 755 | TARGETED_DEVICE_FAMILY = 4; 756 | WATCHOS_DEPLOYMENT_TARGET = 2.1; 757 | }; 758 | name = Release; 759 | }; 760 | 6D7C68221C89FBFC005782C9 /* Debug */ = { 761 | isa = XCBuildConfiguration; 762 | buildSettings = { 763 | APPLICATION_EXTENSION_API_ONLY = YES; 764 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 765 | DEFINES_MODULE = YES; 766 | DYLIB_COMPATIBILITY_VERSION = 1; 767 | DYLIB_CURRENT_VERSION = 1; 768 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 769 | INFOPLIST_FILE = "$(SRCROOT)/Source/Supporting Files/Info.plist"; 770 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 771 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 772 | MODULEMAP_FILE = ""; 773 | PRODUCT_BUNDLE_IDENTIFIER = io.delba.Log; 774 | PRODUCT_NAME = Log; 775 | SDKROOT = appletvos; 776 | SKIP_INSTALL = YES; 777 | SWIFT_VERSION = 5.0; 778 | TARGETED_DEVICE_FAMILY = 3; 779 | TVOS_DEPLOYMENT_TARGET = 9.0; 780 | }; 781 | name = Debug; 782 | }; 783 | 6D7C68231C89FBFC005782C9 /* Release */ = { 784 | isa = XCBuildConfiguration; 785 | buildSettings = { 786 | APPLICATION_EXTENSION_API_ONLY = YES; 787 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 788 | DEFINES_MODULE = YES; 789 | DYLIB_COMPATIBILITY_VERSION = 1; 790 | DYLIB_CURRENT_VERSION = 1; 791 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 792 | INFOPLIST_FILE = "$(SRCROOT)/Source/Supporting Files/Info.plist"; 793 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 794 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 795 | MODULEMAP_FILE = ""; 796 | PRODUCT_BUNDLE_IDENTIFIER = io.delba.Log; 797 | PRODUCT_NAME = Log; 798 | SDKROOT = appletvos; 799 | SKIP_INSTALL = YES; 800 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 801 | SWIFT_VERSION = 5.0; 802 | TARGETED_DEVICE_FAMILY = 3; 803 | TVOS_DEPLOYMENT_TARGET = 9.0; 804 | }; 805 | name = Release; 806 | }; 807 | 6D7C68251C89FBFC005782C9 /* Debug */ = { 808 | isa = XCBuildConfiguration; 809 | buildSettings = { 810 | INFOPLIST_FILE = "$(SRCROOT)/Tests/Supporting Files/Info.plist"; 811 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 812 | PRODUCT_BUNDLE_IDENTIFIER = "io.delba.Log-tvOSTests"; 813 | PRODUCT_NAME = "$(TARGET_NAME)"; 814 | SDKROOT = appletvos; 815 | SWIFT_VERSION = 5.0; 816 | TVOS_DEPLOYMENT_TARGET = 9.1; 817 | }; 818 | name = Debug; 819 | }; 820 | 6D7C68261C89FBFC005782C9 /* Release */ = { 821 | isa = XCBuildConfiguration; 822 | buildSettings = { 823 | INFOPLIST_FILE = "$(SRCROOT)/Tests/Supporting Files/Info.plist"; 824 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 825 | PRODUCT_BUNDLE_IDENTIFIER = "io.delba.Log-tvOSTests"; 826 | PRODUCT_NAME = "$(TARGET_NAME)"; 827 | SDKROOT = appletvos; 828 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 829 | SWIFT_VERSION = 5.0; 830 | TVOS_DEPLOYMENT_TARGET = 9.1; 831 | }; 832 | name = Release; 833 | }; 834 | 6DACCA2E1C89F4C2001B63D9 /* Debug */ = { 835 | isa = XCBuildConfiguration; 836 | buildSettings = { 837 | APPLICATION_EXTENSION_API_ONLY = YES; 838 | CODE_SIGN_IDENTITY = "-"; 839 | COMBINE_HIDPI_IMAGES = YES; 840 | DEFINES_MODULE = YES; 841 | DYLIB_COMPATIBILITY_VERSION = 1; 842 | DYLIB_CURRENT_VERSION = 1; 843 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 844 | FRAMEWORK_VERSION = A; 845 | INFOPLIST_FILE = "$(SRCROOT)/Source/Supporting Files/Info.plist"; 846 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 847 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 848 | MACOSX_DEPLOYMENT_TARGET = 10.9; 849 | MODULEMAP_FILE = ""; 850 | PRODUCT_BUNDLE_IDENTIFIER = io.delba.Log; 851 | PRODUCT_NAME = Log; 852 | SDKROOT = macosx; 853 | SKIP_INSTALL = YES; 854 | SWIFT_VERSION = 5.0; 855 | }; 856 | name = Debug; 857 | }; 858 | 6DACCA2F1C89F4C2001B63D9 /* Release */ = { 859 | isa = XCBuildConfiguration; 860 | buildSettings = { 861 | APPLICATION_EXTENSION_API_ONLY = YES; 862 | CODE_SIGN_IDENTITY = "-"; 863 | COMBINE_HIDPI_IMAGES = YES; 864 | DEFINES_MODULE = YES; 865 | DYLIB_COMPATIBILITY_VERSION = 1; 866 | DYLIB_CURRENT_VERSION = 1; 867 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 868 | FRAMEWORK_VERSION = A; 869 | INFOPLIST_FILE = "$(SRCROOT)/Source/Supporting Files/Info.plist"; 870 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 871 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 872 | MACOSX_DEPLOYMENT_TARGET = 10.9; 873 | MODULEMAP_FILE = ""; 874 | PRODUCT_BUNDLE_IDENTIFIER = io.delba.Log; 875 | PRODUCT_NAME = Log; 876 | SDKROOT = macosx; 877 | SKIP_INSTALL = YES; 878 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 879 | SWIFT_VERSION = 5.0; 880 | }; 881 | name = Release; 882 | }; 883 | 6DACCA301C89F4C2001B63D9 /* Debug */ = { 884 | isa = XCBuildConfiguration; 885 | buildSettings = { 886 | CODE_SIGN_IDENTITY = "-"; 887 | COMBINE_HIDPI_IMAGES = YES; 888 | INFOPLIST_FILE = "$(SRCROOT)/Tests/Supporting Files/Info.plist"; 889 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 890 | MACOSX_DEPLOYMENT_TARGET = 10.11; 891 | MODULEMAP_FILE = ""; 892 | PRODUCT_BUNDLE_IDENTIFIER = "io.delba.Log-OSXTests"; 893 | PRODUCT_NAME = "$(TARGET_NAME)"; 894 | SDKROOT = macosx; 895 | SWIFT_VERSION = 5.0; 896 | }; 897 | name = Debug; 898 | }; 899 | 6DACCA311C89F4C2001B63D9 /* Release */ = { 900 | isa = XCBuildConfiguration; 901 | buildSettings = { 902 | CODE_SIGN_IDENTITY = "-"; 903 | COMBINE_HIDPI_IMAGES = YES; 904 | INFOPLIST_FILE = "$(SRCROOT)/Tests/Supporting Files/Info.plist"; 905 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 906 | MACOSX_DEPLOYMENT_TARGET = 10.11; 907 | MODULEMAP_FILE = ""; 908 | PRODUCT_BUNDLE_IDENTIFIER = "io.delba.Log-OSXTests"; 909 | PRODUCT_NAME = "$(TARGET_NAME)"; 910 | SDKROOT = macosx; 911 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 912 | SWIFT_VERSION = 5.0; 913 | }; 914 | name = Release; 915 | }; 916 | 6DACCA4C1C89F89E001B63D9 /* Debug */ = { 917 | isa = XCBuildConfiguration; 918 | buildSettings = { 919 | APPLICATION_EXTENSION_API_ONLY = YES; 920 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 921 | DEFINES_MODULE = YES; 922 | DYLIB_COMPATIBILITY_VERSION = 1; 923 | DYLIB_CURRENT_VERSION = 1; 924 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 925 | INFOPLIST_FILE = "$(SRCROOT)/Source/Supporting Files/Info.plist"; 926 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 927 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 928 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 929 | MODULEMAP_FILE = ""; 930 | PRODUCT_BUNDLE_IDENTIFIER = io.delba.Log; 931 | PRODUCT_NAME = Log; 932 | SKIP_INSTALL = YES; 933 | SWIFT_VERSION = 5.0; 934 | }; 935 | name = Debug; 936 | }; 937 | 6DACCA4D1C89F89E001B63D9 /* Release */ = { 938 | isa = XCBuildConfiguration; 939 | buildSettings = { 940 | APPLICATION_EXTENSION_API_ONLY = YES; 941 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 942 | DEFINES_MODULE = YES; 943 | DYLIB_COMPATIBILITY_VERSION = 1; 944 | DYLIB_CURRENT_VERSION = 1; 945 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 946 | INFOPLIST_FILE = "$(SRCROOT)/Source/Supporting Files/Info.plist"; 947 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 948 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 949 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 950 | MODULEMAP_FILE = ""; 951 | PRODUCT_BUNDLE_IDENTIFIER = io.delba.Log; 952 | PRODUCT_NAME = Log; 953 | SKIP_INSTALL = YES; 954 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 955 | SWIFT_VERSION = 5.0; 956 | }; 957 | name = Release; 958 | }; 959 | 6DACCA4F1C89F89E001B63D9 /* Debug */ = { 960 | isa = XCBuildConfiguration; 961 | buildSettings = { 962 | INFOPLIST_FILE = "$(SRCROOT)/Tests/Supporting Files/Info.plist"; 963 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 964 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 965 | PRODUCT_BUNDLE_IDENTIFIER = "io.delba.Log-iOSTests"; 966 | PRODUCT_NAME = "$(TARGET_NAME)"; 967 | SWIFT_VERSION = 5.0; 968 | }; 969 | name = Debug; 970 | }; 971 | 6DACCA501C89F89E001B63D9 /* Release */ = { 972 | isa = XCBuildConfiguration; 973 | buildSettings = { 974 | INFOPLIST_FILE = "$(SRCROOT)/Tests/Supporting Files/Info.plist"; 975 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 976 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 977 | PRODUCT_BUNDLE_IDENTIFIER = "io.delba.Log-iOSTests"; 978 | PRODUCT_NAME = "$(TARGET_NAME)"; 979 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 980 | SWIFT_VERSION = 5.0; 981 | }; 982 | name = Release; 983 | }; 984 | /* End XCBuildConfiguration section */ 985 | 986 | /* Begin XCConfigurationList section */ 987 | 6D06F6C11C189C4B0010110E /* Build configuration list for PBXProject "Log" */ = { 988 | isa = XCConfigurationList; 989 | buildConfigurations = ( 990 | 6D06F6D91C189C4C0010110E /* Debug */, 991 | 6D06F6DA1C189C4C0010110E /* Release */, 992 | ); 993 | defaultConfigurationIsVisible = 0; 994 | defaultConfigurationName = Release; 995 | }; 996 | 6D7C68081C89FBAB005782C9 /* Build configuration list for PBXNativeTarget "Log watchOS" */ = { 997 | isa = XCConfigurationList; 998 | buildConfigurations = ( 999 | 6D7C68091C89FBAB005782C9 /* Debug */, 1000 | 6D7C680A1C89FBAB005782C9 /* Release */, 1001 | ); 1002 | defaultConfigurationIsVisible = 0; 1003 | defaultConfigurationName = Release; 1004 | }; 1005 | 6D7C68211C89FBFC005782C9 /* Build configuration list for PBXNativeTarget "Log tvOS" */ = { 1006 | isa = XCConfigurationList; 1007 | buildConfigurations = ( 1008 | 6D7C68221C89FBFC005782C9 /* Debug */, 1009 | 6D7C68231C89FBFC005782C9 /* Release */, 1010 | ); 1011 | defaultConfigurationIsVisible = 0; 1012 | defaultConfigurationName = Release; 1013 | }; 1014 | 6D7C68241C89FBFC005782C9 /* Build configuration list for PBXNativeTarget "Log tvOS Tests" */ = { 1015 | isa = XCConfigurationList; 1016 | buildConfigurations = ( 1017 | 6D7C68251C89FBFC005782C9 /* Debug */, 1018 | 6D7C68261C89FBFC005782C9 /* Release */, 1019 | ); 1020 | defaultConfigurationIsVisible = 0; 1021 | defaultConfigurationName = Release; 1022 | }; 1023 | 6DACCA321C89F4C2001B63D9 /* Build configuration list for PBXNativeTarget "Log OSX" */ = { 1024 | isa = XCConfigurationList; 1025 | buildConfigurations = ( 1026 | 6DACCA2E1C89F4C2001B63D9 /* Debug */, 1027 | 6DACCA2F1C89F4C2001B63D9 /* Release */, 1028 | ); 1029 | defaultConfigurationIsVisible = 0; 1030 | defaultConfigurationName = Release; 1031 | }; 1032 | 6DACCA331C89F4C2001B63D9 /* Build configuration list for PBXNativeTarget "Log OSX Tests" */ = { 1033 | isa = XCConfigurationList; 1034 | buildConfigurations = ( 1035 | 6DACCA301C89F4C2001B63D9 /* Debug */, 1036 | 6DACCA311C89F4C2001B63D9 /* Release */, 1037 | ); 1038 | defaultConfigurationIsVisible = 0; 1039 | defaultConfigurationName = Release; 1040 | }; 1041 | 6DACCA4B1C89F89E001B63D9 /* Build configuration list for PBXNativeTarget "Log iOS" */ = { 1042 | isa = XCConfigurationList; 1043 | buildConfigurations = ( 1044 | 6DACCA4C1C89F89E001B63D9 /* Debug */, 1045 | 6DACCA4D1C89F89E001B63D9 /* Release */, 1046 | ); 1047 | defaultConfigurationIsVisible = 0; 1048 | defaultConfigurationName = Release; 1049 | }; 1050 | 6DACCA4E1C89F89E001B63D9 /* Build configuration list for PBXNativeTarget "Log iOS Tests" */ = { 1051 | isa = XCConfigurationList; 1052 | buildConfigurations = ( 1053 | 6DACCA4F1C89F89E001B63D9 /* Debug */, 1054 | 6DACCA501C89F89E001B63D9 /* Release */, 1055 | ); 1056 | defaultConfigurationIsVisible = 0; 1057 | defaultConfigurationName = Release; 1058 | }; 1059 | /* End XCConfigurationList section */ 1060 | }; 1061 | rootObject = 6D06F6BE1C189C4B0010110E /* Project object */; 1062 | } 1063 | -------------------------------------------------------------------------------- /Log.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Log.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Log.xcodeproj/xcshareddata/xcschemes/Log OSX.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 65 | 71 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 89 | 90 | 91 | 92 | 94 | 95 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /Log.xcodeproj/xcshareddata/xcschemes/Log iOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 65 | 71 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 89 | 90 | 91 | 92 | 94 | 95 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /Log.xcodeproj/xcshareddata/xcschemes/Log tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 65 | 71 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 89 | 90 | 91 | 92 | 94 | 95 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /Log.xcodeproj/xcshareddata/xcschemes/Log watchOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /Log.xcodeproj/xcuserdata/damien.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /Log.xcodeproj/xcuserdata/damien.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Log OSX.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 1 11 | 12 | Log iOS.xcscheme_^#shared#^_ 13 | 14 | orderHint 15 | 0 16 | 17 | Log tvOS.xcscheme_^#shared#^_ 18 | 19 | orderHint 20 | 2 21 | 22 | Log watchOS.xcscheme_^#shared#^_ 23 | 24 | orderHint 25 | 3 26 | 27 | 28 | SuppressBuildableAutocreation 29 | 30 | 6D06F6C61C189C4B0010110E 31 | 32 | primary 33 | 34 | 35 | 6D06F6D01C189C4C0010110E 36 | 37 | primary 38 | 39 | 40 | 6D7C67F51C89FB77005782C9 41 | 42 | primary 43 | 44 | 45 | 6D7C68021C89FBAB005782C9 46 | 47 | primary 48 | 49 | 50 | 6D7C680F1C89FBFC005782C9 51 | 52 | primary 53 | 54 | 55 | 6D7C68181C89FBFC005782C9 56 | 57 | primary 58 | 59 | 60 | 6DACCA1C1C89F4C2001B63D9 61 | 62 | primary 63 | 64 | 65 | 6DACCA251C89F4C2001B63D9 66 | 67 | primary 68 | 69 | 70 | 6DACCA391C89F89D001B63D9 71 | 72 | primary 73 | 74 | 75 | 6DACCA421C89F89E001B63D9 76 | 77 | primary 78 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.0 2 | // 3 | // Package.swift 4 | // 5 | // Copyright (c) 2015-2019 Damien (http://delba.io) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in all 15 | // copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | // SOFTWARE. 24 | // 25 | 26 | import PackageDescription 27 | 28 | let package = Package( 29 | name: "Log", 30 | products: [ 31 | .library( 32 | name: "Log", 33 | targets: ["Log"]), 34 | ], 35 | targets: [ 36 | .target( 37 | name: "Log", 38 | path: "Source") 39 | ] 40 | ) 41 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 | 5 |

6 | Travis Status 7 | CocoaPods compatible 8 | Carthage compatible 9 | Platform 10 |

11 | 12 | `Log` is a powerful logging framework that provides built-in themes and formatters, and a nice API to define your owns. 13 | 14 | > Get the most out of `Log` by installing [`XcodeColors`](https://github.com/robbiehanson/XcodeColors) and [`KZLinkedConsole`](https://github.com/krzysztofzablocki/KZLinkedConsole) 15 | 16 |

17 | UsageInstallationLicense 18 |

19 | 20 | ### Usage 21 | 22 | #### The basics 23 | 24 | - Use `Log` just as you would use `print`. 25 | 26 | ```swift 27 | let Log = Logger() 28 | 29 | Log.trace("Called!!!") 30 | Log.debug("Who is self:", self) 31 | Log.info(some, objects, here) 32 | Log.warning(one, two, three, separator: " - ") 33 | Log.error(error, terminator: "😱😱😱\n") 34 | ``` 35 | 36 | 37 | 38 | - Disable `Log` by setting `enabled` to `false`: 39 | 40 | ```swift 41 | Log.enabled = false 42 | ``` 43 | 44 | - Define a minimum level of severity to only print the messages with a greater or equal severity: 45 | 46 | ```swift 47 | Log.minLevel = .warning 48 | ``` 49 | 50 | > The severity levels are `trace`, `debug`, `info`, `warning`, and `error`. 51 | 52 | #### Customization 53 | 54 | - Create your own `Logger` by changing its `Theme` and/or `Formatter`. 55 | 56 | A suggested way of doing it is by extending `Formatters` and `Themes`: 57 | 58 | ```swift 59 | extension Formatters { 60 | static let detailed = Formatter("[%@] %@.%@:%@ %@: %@", [ 61 | .date("yyyy-MM-dd HH:mm:ss.SSS"), 62 | .file(fullPath: false, fileExtension: false), 63 | .function, 64 | .line, 65 | .level, 66 | .message 67 | ]) 68 | } 69 | 70 | extension Themes { 71 | static let tomorrowNight = Theme( 72 | trace: "#C5C8C6", 73 | debug: "#81A2BE", 74 | info: "#B5BD68", 75 | warning: "#F0C674", 76 | error: "#CC6666" 77 | ) 78 | } 79 | ``` 80 | 81 | ```swift 82 | let Log = Logger(formatter: .detailed, theme: .tomorrowNight) 83 | ``` 84 | 85 | 86 | 87 | > See the built-in [formatters](https://github.com/delba/Log/blob/master/Source/Extensions/Formatters.swift) and [themes](https://github.com/delba/Log/blob/master/Source/Extensions/Themes.swift) for more examples. 88 | 89 | **Tip:** `Log.format` and `Log.colors` can be useful to visually debug your logger. 90 | 91 | Nothing prevents you from creating as many loggers as you want! 92 | 93 | ```swift 94 | let Basic = Logger(formatter: .default, theme: nil) 95 | let Short = Logger( 96 | formatter: Formatter("%@: %@", .level, .message), 97 | theme: .tomorrowNightEighties, 98 | minLevel: .info 99 | ) 100 | ``` 101 | 102 | 103 | 104 | - Turn off the colors by setting the theme to `nil`: 105 | 106 | ```swift 107 | Log.theme = nil 108 | ``` 109 | 110 | #### Advanced 111 | 112 | Include a custom `Block` component in your formatter to print its result in every log message: 113 | 114 | ```swift 115 | struct User { 116 | static func token() -> Int { 117 | return NSUserDefaults.standardUserDefaults.integerForKey("token") 118 | } 119 | } 120 | 121 | Log.formatter = Formatter("[%@] %@: %@", .block(User.token), .level, .message) 122 | ``` 123 | 124 | ## Installation 125 | 126 | ### Carthage 127 | 128 | [Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that automates the process of adding frameworks to your Cocoa application. 129 | 130 | You can install Carthage with [Homebrew](http://brew.sh/) using the following command: 131 | 132 | ```bash 133 | $ brew update 134 | $ brew install carthage 135 | ``` 136 | 137 | To integrate Log into your Xcode project using Carthage, specify it in your `Cartfile`: 138 | 139 | ```ogdl 140 | github "delba/Log" 141 | ``` 142 | 143 | ### CocoaPods 144 | 145 | [CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. 146 | 147 | You can install it with the following command: 148 | 149 | ```bash 150 | $ gem install cocoapods 151 | ``` 152 | 153 | To integrate Log into your Xcode project using CocoaPods, specify it in your `Podfile`: 154 | 155 | ```ruby 156 | use_frameworks! 157 | 158 | pod 'Log' 159 | ``` 160 | 161 | ## License 162 | 163 | Copyright (c) 2015-2016 Damien (http://delba.io) 164 | 165 | 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: 166 | 167 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 168 | 169 | 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. 170 | -------------------------------------------------------------------------------- /Source/Benchmarker.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Benchmarker.swift 3 | // 4 | // Copyright (c) 2015-2019 Damien (http://delba.io) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | // SOFTWARE. 23 | // 24 | 25 | import Foundation 26 | 27 | class Benchmarker { 28 | typealias Result = ( 29 | description: String?, 30 | average: Double, 31 | relativeStandardDeviation: Double 32 | ) 33 | 34 | /** 35 | Measures the performance of code. 36 | 37 | - parameter description: The measure description. 38 | - parameter n: The number of iterations. 39 | - parameter block: The block to measure. 40 | 41 | - returns: The measure result. 42 | */ 43 | func measure(_ description: String? = nil, iterations n: Int = 10, block: () -> Void) -> Result { 44 | precondition(n >= 1, "Iteration must be greater or equal to 1.") 45 | 46 | let durations = (0.. Void) -> Double { 60 | let date = Date() 61 | 62 | block() 63 | 64 | return abs(date.timeIntervalSinceNow) 65 | } 66 | 67 | private func average(_ durations: [Double]) -> Double { 68 | return durations.reduce(0, +) / Double(durations.count) 69 | } 70 | 71 | private func standardDeviation(_ average: Double, durations: [Double]) -> Double { 72 | return durations.reduce(0) { sum, duration in 73 | return sum + pow(duration - average, 2) 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /Source/Extensions/Formatters.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Formatters.swift 3 | // 4 | // Copyright (c) 2015-2019 Damien (http://delba.io) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | // SOFTWARE. 23 | // 24 | 25 | extension Formatters { 26 | public static let `default` = Formatter("[%@] %@ %@: %@", [ 27 | .date("yyyy-MM-dd HH:mm:ss.SSS"), 28 | .location, 29 | .level, 30 | .message 31 | ]) 32 | 33 | public static let minimal = Formatter("%@ %@: %@", [ 34 | .location, 35 | .level, 36 | .message 37 | ]) 38 | 39 | public static let detailed = Formatter("[%@] %@.%@:%@ %@: %@", [ 40 | .date("yyyy-MM-dd HH:mm:ss.SSS"), 41 | .file(fullPath: false, fileExtension: false), 42 | .function, 43 | .line, 44 | .level, 45 | .message 46 | ]) 47 | } 48 | -------------------------------------------------------------------------------- /Source/Extensions/Themes.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Themes.swift 3 | // 4 | // Copyright (c) 2015-2019 Damien (http://delba.io) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | // SOFTWARE. 23 | // 24 | 25 | extension Themes { 26 | public static let `default` = Theme( 27 | trace: "#C8C8C8", 28 | debug: "#0000FF", 29 | info: "#00FF00", 30 | warning: "#FFFB00", 31 | error: "#FF0000" 32 | ) 33 | 34 | public static let dusk = Theme( 35 | trace: "#FFFFFF", 36 | debug: "#526EDA", 37 | info: "#93C96A", 38 | warning: "#D28F5A", 39 | error: "#E44347" 40 | ) 41 | 42 | public static let midnight = Theme( 43 | trace: "#FFFFFF", 44 | debug: "#527EFF", 45 | info: "#08FA95", 46 | warning: "#EB905A", 47 | error: "#FF4647" 48 | ) 49 | 50 | public static let tomorrow = Theme( 51 | trace: "#4D4D4C", 52 | debug: "#4271AE", 53 | info: "#718C00", 54 | warning: "#EAB700", 55 | error: "#C82829" 56 | ) 57 | 58 | public static let tomorrowNight = Theme( 59 | trace: "#C5C8C6", 60 | debug: "#81A2BE", 61 | info: "#B5BD68", 62 | warning: "#F0C674", 63 | error: "#CC6666" 64 | ) 65 | 66 | public static let tomorrowNightEighties = Theme( 67 | trace: "#CCCCCC", 68 | debug: "#6699CC", 69 | info: "#99CC99", 70 | warning: "#FFCC66", 71 | error: "#F2777A" 72 | ) 73 | 74 | public static let tomorrowNightBright = Theme( 75 | trace: "#EAEAEA", 76 | debug: "#7AA6DA", 77 | info: "#B9CA4A", 78 | warning: "#E7C547", 79 | error: "#D54E53" 80 | ) 81 | } 82 | -------------------------------------------------------------------------------- /Source/Formatter.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Formatter.swift 3 | // 4 | // Copyright (c) 2015-2019 Damien (http://delba.io) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | // SOFTWARE. 23 | // 24 | 25 | import Foundation 26 | 27 | public enum Component { 28 | case date(String) 29 | case message 30 | case level 31 | case file(fullPath: Bool, fileExtension: Bool) 32 | case line 33 | case column 34 | case function 35 | case location 36 | case block(() -> Any?) 37 | } 38 | 39 | open class Formatters {} 40 | 41 | open class Formatter: Formatters { 42 | /// The formatter format. 43 | private var format: String 44 | 45 | /// The formatter components. 46 | private var components: [Component] 47 | 48 | /// The date formatter. 49 | private let dateFormatter = DateFormatter() 50 | 51 | /// The formatter logger. 52 | weak var logger: Logger? 53 | 54 | /// The formatter textual representation. 55 | var description: String { 56 | return String(format: format, arguments: components.map { (component: Component) -> CVarArg in 57 | return String(describing: component).uppercased() 58 | }) 59 | } 60 | 61 | /** 62 | Creates and returns a new formatter with the specified format and components. 63 | 64 | - parameter format: The formatter format. 65 | - parameter components: The formatter components. 66 | 67 | - returns: A newly created formatter. 68 | */ 69 | public convenience init(_ format: String, _ components: Component...) { 70 | self.init(format, components) 71 | } 72 | 73 | /** 74 | Creates and returns a new formatter with the specified format and components. 75 | 76 | - parameter format: The formatter format. 77 | - parameter components: The formatter components. 78 | 79 | - returns: A newly created formatter. 80 | */ 81 | public init(_ format: String, _ components: [Component]) { 82 | self.format = format 83 | self.components = components 84 | } 85 | 86 | /** 87 | Formats a string with the formatter format and components. 88 | 89 | - parameter level: The severity level. 90 | - parameter items: The items to format. 91 | - parameter separator: The separator between the items. 92 | - parameter terminator: The terminator of the formatted string. 93 | - parameter file: The log file path. 94 | - parameter line: The log line number. 95 | - parameter column: The log column number. 96 | - parameter function: The log function. 97 | - parameter date: The log date. 98 | 99 | - returns: A formatted string. 100 | */ 101 | func format(level: Level, items: [Any], separator: String, terminator: String, file: String, line: Int, column: Int, function: String, date: Date) -> String { 102 | let arguments = components.map { (component: Component) -> CVarArg in 103 | switch component { 104 | case let .date(dateFormat): 105 | return format(date: date, dateFormat: dateFormat) 106 | case let .file(fullPath, fileExtension): 107 | return format(file: file, fullPath: fullPath, fileExtension: fileExtension) 108 | case .function: 109 | return String(function) 110 | case .line: 111 | return String(line) 112 | case .column: 113 | return String(column) 114 | case .level: 115 | return format(level: level) 116 | case .message: 117 | return items.map({ String(describing: $0) }).joined(separator: separator) 118 | case .location: 119 | return format(file: file, line: line) 120 | case let .block(block): 121 | return block().flatMap({ String(describing: $0) }) ?? "" 122 | } 123 | } 124 | 125 | return String(format: format, arguments: arguments) + terminator 126 | } 127 | 128 | /** 129 | Formats a string with the formatter format and components. 130 | 131 | - parameter description: The measure description. 132 | - parameter average: The average time. 133 | - parameter relativeStandardDeviation: The relative standard description. 134 | - parameter file: The log file path. 135 | - parameter line: The log line number. 136 | - parameter column: The log column number. 137 | - parameter function: The log function. 138 | - parameter date: The log date. 139 | 140 | - returns: A formatted string. 141 | */ 142 | func format(description: String?, average: Double, relativeStandardDeviation: Double, file: String, line: Int, column: Int, function: String, date: Date) -> String { 143 | 144 | let arguments = components.map { (component: Component) -> CVarArg in 145 | switch component { 146 | case let .date(dateFormat): 147 | return format(date: date, dateFormat: dateFormat) 148 | case let .file(fullPath, fileExtension): 149 | return format(file: file, fullPath: fullPath, fileExtension: fileExtension) 150 | case .function: 151 | return String(function) 152 | case .line: 153 | return String(line) 154 | case .column: 155 | return String(column) 156 | case .level: 157 | return format(description: description) 158 | case .message: 159 | return format(average: average, relativeStandardDeviation: relativeStandardDeviation) 160 | case .location: 161 | return format(file: file, line: line) 162 | case let .block(block): 163 | return block().flatMap({ String(describing: $0) }) ?? "" 164 | } 165 | } 166 | 167 | return String(format: format, arguments: arguments) 168 | } 169 | } 170 | 171 | private extension Formatter { 172 | /** 173 | Formats a date with the specified date format. 174 | 175 | - parameter date: The date. 176 | - parameter dateFormat: The date format. 177 | 178 | - returns: A formatted date. 179 | */ 180 | func format(date: Date, dateFormat: String) -> String { 181 | dateFormatter.dateFormat = dateFormat 182 | return dateFormatter.string(from: date) 183 | } 184 | 185 | /** 186 | Formats a file path with the specified parameters. 187 | 188 | - parameter file: The file path. 189 | - parameter fullPath: Whether the full path should be included. 190 | - parameter fileExtension: Whether the file extension should be included. 191 | 192 | - returns: A formatted file path. 193 | */ 194 | func format(file: String, fullPath: Bool, fileExtension: Bool) -> String { 195 | var file = file 196 | 197 | if !fullPath { file = file.lastPathComponent } 198 | if !fileExtension { file = file.stringByDeletingPathExtension } 199 | 200 | return file 201 | } 202 | 203 | /** 204 | Formats a Location component with a specified file path and line number. 205 | 206 | - parameter file: The file path. 207 | - parameter line: The line number. 208 | 209 | - returns: A formatted Location component. 210 | */ 211 | func format(file: String, line: Int) -> String { 212 | return [ 213 | format(file: file, fullPath: false, fileExtension: true), 214 | String(line) 215 | ].joined(separator: ":") 216 | } 217 | 218 | /** 219 | Formats a Level component. 220 | 221 | - parameter level: The Level component. 222 | 223 | - returns: A formatted Level component. 224 | */ 225 | func format(level: Level) -> String { 226 | let text = level.description 227 | 228 | if let color = logger?.theme?.colors[level] { 229 | return text.withColor(color) 230 | } 231 | 232 | return text 233 | } 234 | 235 | /** 236 | Formats a measure description. 237 | 238 | - parameter description: The measure description. 239 | 240 | - returns: A formatted measure description. 241 | */ 242 | func format(description: String?) -> String { 243 | var text = "MEASURE" 244 | 245 | if let color = logger?.theme?.colors[.debug] { 246 | text = text.withColor(color) 247 | } 248 | 249 | if let description = description { 250 | text = "\(text) \(description)" 251 | } 252 | 253 | return text 254 | } 255 | 256 | /** 257 | Formats an average time and a relative standard deviation. 258 | 259 | - parameter average: The average time. 260 | - parameter relativeStandardDeviation: The relative standard deviation. 261 | 262 | - returns: A formatted average time and relative standard deviation. 263 | */ 264 | func format(average: Double, relativeStandardDeviation: Double) -> String { 265 | let average = format(average: average) 266 | let relativeStandardDeviation = format(relativeStandardDeviation: relativeStandardDeviation) 267 | 268 | return "Time: \(average) sec (\(relativeStandardDeviation) STDEV)" 269 | } 270 | 271 | /** 272 | Formats an average time. 273 | 274 | - parameter average: An average time. 275 | 276 | - returns: A formatted average time. 277 | */ 278 | func format(average: Double) -> String { 279 | return String(format: "%.3f", average) 280 | } 281 | 282 | /** 283 | Formats a list of durations. 284 | 285 | - parameter durations: A list of durations. 286 | 287 | - returns: A formatted list of durations. 288 | */ 289 | func format(durations: [Double]) -> String { 290 | var format = Array(repeating: "%.6f", count: durations.count).joined(separator: ", ") 291 | format = "[\(format)]" 292 | 293 | return String(format: format, arguments: durations.map { $0 as CVarArg }) 294 | } 295 | 296 | /** 297 | Formats a standard deviation. 298 | 299 | - parameter standardDeviation: A standard deviation. 300 | 301 | - returns: A formatted standard deviation. 302 | */ 303 | func format(standardDeviation: Double) -> String { 304 | return String(format: "%.6f", standardDeviation) 305 | } 306 | 307 | /** 308 | Formats a relative standard deviation. 309 | 310 | - parameter relativeStandardDeviation: A relative standard deviation. 311 | 312 | - returns: A formatted relative standard deviation. 313 | */ 314 | func format(relativeStandardDeviation: Double) -> String { 315 | return String(format: "%.3f%%", relativeStandardDeviation) 316 | } 317 | } 318 | -------------------------------------------------------------------------------- /Source/Logger.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Logger.swift 3 | // 4 | // Copyright (c) 2015-2019 Damien (http://delba.io) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | // SOFTWARE. 23 | // 24 | 25 | import Foundation 26 | 27 | private let benchmarker = Benchmarker() 28 | 29 | public enum Level: Int { 30 | case trace, debug, info, warning, error 31 | 32 | var description: String { 33 | return String(describing: self).uppercased() 34 | } 35 | } 36 | 37 | extension Level: Comparable { 38 | public static func < (lhs: Level, rhs: Level) -> Bool { 39 | return lhs.rawValue < rhs.rawValue 40 | } 41 | } 42 | 43 | open class Logger { 44 | /// The logger state. 45 | open var enabled: Bool = true 46 | 47 | /// The logger formatter. 48 | open var formatter: Formatter { 49 | didSet { formatter.logger = self } 50 | } 51 | 52 | /// The logger theme. 53 | open var theme: Theme? 54 | 55 | /// The minimum level of severity. 56 | open var minLevel: Level 57 | 58 | /// The logger format. 59 | open var format: String { 60 | return formatter.description 61 | } 62 | 63 | /// The logger colors 64 | open var colors: String { 65 | return theme?.description ?? "" 66 | } 67 | 68 | /// The queue used for logging. 69 | private let queue = DispatchQueue(label: "delba.log") 70 | 71 | /** 72 | Creates and returns a new logger. 73 | 74 | - parameter formatter: The formatter. 75 | - parameter theme: The theme. 76 | - parameter minLevel: The minimum level of severity. 77 | 78 | - returns: A newly created logger. 79 | */ 80 | public init(formatter: Formatter = .default, theme: Theme? = nil, minLevel: Level = .trace) { 81 | self.formatter = formatter 82 | self.theme = theme 83 | self.minLevel = minLevel 84 | 85 | formatter.logger = self 86 | } 87 | 88 | /** 89 | Logs a message with a trace severity level. 90 | 91 | - parameter items: The items to log. 92 | - parameter separator: The separator between the items. 93 | - parameter terminator: The terminator of the log message. 94 | - parameter file: The file in which the log happens. 95 | - parameter line: The line at which the log happens. 96 | - parameter column: The column at which the log happens. 97 | - parameter function: The function in which the log happens. 98 | */ 99 | open func trace(_ items: Any..., separator: String = " ", terminator: String = "\n", file: String = #file, line: Int = #line, column: Int = #column, function: String = #function) { 100 | log(.trace, items, separator, terminator, file, line, column, function) 101 | } 102 | 103 | /** 104 | Logs a message with a debug severity level. 105 | 106 | - parameter items: The items to log. 107 | - parameter separator: The separator between the items. 108 | - parameter terminator: The terminator of the log message. 109 | - parameter file: The file in which the log happens. 110 | - parameter line: The line at which the log happens. 111 | - parameter column: The column at which the log happens. 112 | - parameter function: The function in which the log happens. 113 | */ 114 | open func debug(_ items: Any..., separator: String = " ", terminator: String = "\n", file: String = #file, line: Int = #line, column: Int = #column, function: String = #function) { 115 | log(.debug, items, separator, terminator, file, line, column, function) 116 | } 117 | 118 | /** 119 | Logs a message with an info severity level. 120 | 121 | - parameter items: The items to log. 122 | - parameter separator: The separator between the items. 123 | - parameter terminator: The terminator of the log message. 124 | - parameter file: The file in which the log happens. 125 | - parameter line: The line at which the log happens. 126 | - parameter column: The column at which the log happens. 127 | - parameter function: The function in which the log happens. 128 | */ 129 | open func info(_ items: Any..., separator: String = " ", terminator: String = "\n", file: String = #file, line: Int = #line, column: Int = #column, function: String = #function) { 130 | log(.info, items, separator, terminator, file, line, column, function) 131 | } 132 | 133 | /** 134 | Logs a message with a warning severity level. 135 | 136 | - parameter items: The items to log. 137 | - parameter separator: The separator between the items. 138 | - parameter terminator: The terminator of the log message. 139 | - parameter file: The file in which the log happens. 140 | - parameter line: The line at which the log happens. 141 | - parameter column: The column at which the log happens. 142 | - parameter function: The function in which the log happens. 143 | */ 144 | open func warning(_ items: Any..., separator: String = " ", terminator: String = "\n", file: String = #file, line: Int = #line, column: Int = #column, function: String = #function) { 145 | log(.warning, items, separator, terminator, file, line, column, function) 146 | } 147 | 148 | /** 149 | Logs a message with an error severity level. 150 | 151 | - parameter items: The items to log. 152 | - parameter separator: The separator between the items. 153 | - parameter terminator: The terminator of the log message. 154 | - parameter file: The file in which the log happens. 155 | - parameter line: The line at which the log happens. 156 | - parameter column: The column at which the log happens. 157 | - parameter function: The function in which the log happens. 158 | */ 159 | open func error(_ items: Any..., separator: String = " ", terminator: String = "\n", file: String = #file, line: Int = #line, column: Int = #column, function: String = #function) { 160 | log(.error, items, separator, terminator, file, line, column, function) 161 | } 162 | 163 | /** 164 | Logs a message. 165 | 166 | - parameter level: The severity level. 167 | - parameter items: The items to log. 168 | - parameter separator: The separator between the items. 169 | - parameter terminator: The terminator of the log message. 170 | - parameter file: The file in which the log happens. 171 | - parameter line: The line at which the log happens. 172 | - parameter column: The column at which the log happens. 173 | - parameter function: The function in which the log happens. 174 | */ 175 | private func log(_ level: Level, _ items: [Any], _ separator: String, _ terminator: String, _ file: String, _ line: Int, _ column: Int, _ function: String) { 176 | guard enabled && level >= minLevel else { return } 177 | 178 | let date = Date() 179 | 180 | let result = formatter.format( 181 | level: level, 182 | items: items, 183 | separator: separator, 184 | terminator: terminator, 185 | file: file, 186 | line: line, 187 | column: column, 188 | function: function, 189 | date: date 190 | ) 191 | 192 | queue.async { 193 | Swift.print(result, separator: "", terminator: "") 194 | } 195 | } 196 | 197 | /** 198 | Measures the performance of code. 199 | 200 | - parameter description: The measure description. 201 | - parameter n: The number of iterations. 202 | - parameter file: The file in which the measure happens. 203 | - parameter line: The line at which the measure happens. 204 | - parameter column: The column at which the measure happens. 205 | - parameter function: The function in which the measure happens. 206 | - parameter block: The block to measure. 207 | */ 208 | open func measure(_ description: String? = nil, iterations n: Int = 10, file: String = #file, line: Int = #line, column: Int = #column, function: String = #function, block: () -> Void) { 209 | guard enabled && .debug >= minLevel else { return } 210 | 211 | let measure = benchmarker.measure(description, iterations: n, block: block) 212 | 213 | let date = Date() 214 | 215 | let result = formatter.format( 216 | description: measure.description, 217 | average: measure.average, 218 | relativeStandardDeviation: measure.relativeStandardDeviation, 219 | file: file, 220 | line: line, 221 | column: column, 222 | function: function, 223 | date: date 224 | ) 225 | 226 | queue.async { 227 | Swift.print(result) 228 | } 229 | } 230 | } 231 | -------------------------------------------------------------------------------- /Source/Supporting Files/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Source/Supporting Files/Log.h: -------------------------------------------------------------------------------- 1 | // 2 | // Log.h 3 | // 4 | // Copyright (c) 2015-2019 Damien (http://delba.io) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | // SOFTWARE. 23 | // 24 | 25 | @import Foundation; 26 | 27 | FOUNDATION_EXPORT double LogVersionNumber; 28 | FOUNDATION_EXPORT const unsigned char LogVersionString[]; 29 | -------------------------------------------------------------------------------- /Source/Supporting Files/Utilities.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Utilities.swift 3 | // 4 | // Copyright (c) 2015-2019 Damien (http://delba.io) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | // SOFTWARE. 23 | // 24 | 25 | import Foundation 26 | 27 | extension String { 28 | /// The last path component of the receiver. 29 | var lastPathComponent: String { 30 | return NSString(string: self).lastPathComponent 31 | } 32 | 33 | /// A new string made by deleting the extension from the receiver. 34 | var stringByDeletingPathExtension: String { 35 | return NSString(string: self).deletingPathExtension 36 | } 37 | 38 | /** 39 | Returns a string colored with the specified color. 40 | 41 | - parameter color: The string representation of the color. 42 | 43 | - returns: A string colored with the specified color. 44 | */ 45 | func withColor(_ color: String?) -> String { 46 | guard let color = color else { 47 | return self 48 | } 49 | 50 | return "\u{001b}[fg\(color);\(self)\u{001b}[;" 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Source/Theme.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Theme.swift 3 | // 4 | // Copyright (c) 2015-2019 Damien (http://delba.io) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | // SOFTWARE. 23 | // 24 | 25 | import Foundation 26 | 27 | open class Themes {} 28 | 29 | open class Theme: Themes { 30 | /// The theme colors. 31 | var colors: [Level: String] 32 | 33 | /// The theme textual representation. 34 | var description: String { 35 | return colors.keys.sorted().map { 36 | $0.description.withColor(colors[$0]) 37 | }.joined(separator: " ") 38 | } 39 | 40 | /** 41 | Creates and returns a theme with the specified colors. 42 | 43 | - parameter trace: The color for the trace level. 44 | - parameter debug: The color for the debug level. 45 | - parameter info: The color for the info level. 46 | - parameter warning: The color for the warning level. 47 | - parameter error: The color for the error level. 48 | 49 | - returns: A theme with the specified colors. 50 | */ 51 | public init(trace: String, debug: String, info: String, warning: String, error: String) { 52 | colors = [ 53 | .trace: Theme.formatHex(trace), 54 | .debug: Theme.formatHex(debug), 55 | .info: Theme.formatHex(info), 56 | .warning: Theme.formatHex(warning), 57 | .error: Theme.formatHex(error) 58 | ] 59 | } 60 | 61 | /** 62 | Returns a string representation of the hex color. 63 | 64 | - parameter hex: The hex color. 65 | 66 | - returns: A string representation of the hex color. 67 | */ 68 | private static func formatHex(_ hex: String) -> String { 69 | let scanner = Scanner(string: hex) 70 | var hex: UInt32 = 0 71 | 72 | scanner.charactersToBeSkipped = CharacterSet(charactersIn: "#") 73 | scanner.scanHexInt32(&hex) 74 | 75 | let r = (hex & 0xFF0000) >> 16 76 | let g = (hex & 0xFF00) >> 8 77 | let b = (hex & 0xFF) 78 | 79 | return [r, g, b].map({ String($0) }).joined(separator: ",") 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /Tests/LogTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LogTests.swift 3 | // 4 | // Copyright (c) 2015-2019 Damien (http://delba.io) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | // SOFTWARE. 23 | // 24 | 25 | import XCTest 26 | 27 | class LogTests: XCTestCase { 28 | 29 | override func setUp() { 30 | super.setUp() 31 | } 32 | 33 | override func tearDown() { 34 | super.tearDown() 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /Tests/Supporting Files/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | --------------------------------------------------------------------------------