From a30ea5a64e4696e9635dbeb711a982eb73efea16 Mon Sep 17 00:00:00 2001 From: VishwaiOSDev Date: Sun, 19 Feb 2023 22:11:28 +0530 Subject: [PATCH] Feature: Consumed new LoggerKit and NetworkKit --- Loadify.xcodeproj/project.pbxproj | 6 ++++- .../xcshareddata/swiftpm/Package.resolved | 8 +++--- Loadify/App/LoadifyApp.swift | 1 + .../Others/Extensions/Logger+Extension.swift | 25 +++++++++++++++++++ 4 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 Loadify/Others/Extensions/Logger+Extension.swift diff --git a/Loadify.xcodeproj/project.pbxproj b/Loadify.xcodeproj/project.pbxproj index a4dd435..a73a09d 100644 --- a/Loadify.xcodeproj/project.pbxproj +++ b/Loadify.xcodeproj/project.pbxproj @@ -16,6 +16,7 @@ 883233872855F34000BF38B5 /* Double+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 883233862855F34000BF38B5 /* Double+Extension.swift */; }; 88379936283A19F400DDBA79 /* Int+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88379935283A19F400DDBA79 /* Int+Extension.swift */; }; 88379938283A1A0F00DDBA79 /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88379937283A1A0F00DDBA79 /* String+Extension.swift */; }; + 88498D4C29A285BE007303B0 /* Logger+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88498D4B29A285BE007303B0 /* Logger+Extension.swift */; }; 888C864B29059F6300E86D85 /* NetworkKit in Frameworks */ = {isa = PBXBuildFile; productRef = 888C864A29059F6300E86D85 /* NetworkKit */; }; 889714F82932618200D8B1B7 /* DownloadStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 889714F72932618200D8B1B7 /* DownloadStatus.swift */; }; 88A729AE28264AD100B5FE61 /* LoadifyApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88A729AD28264AD100B5FE61 /* LoadifyApp.swift */; }; @@ -59,6 +60,7 @@ 883233862855F34000BF38B5 /* Double+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Double+Extension.swift"; sourceTree = ""; }; 88379935283A19F400DDBA79 /* Int+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Int+Extension.swift"; sourceTree = ""; }; 88379937283A1A0F00DDBA79 /* String+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Extension.swift"; sourceTree = ""; }; + 88498D4B29A285BE007303B0 /* Logger+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Logger+Extension.swift"; sourceTree = ""; }; 889714F72932618200D8B1B7 /* DownloadStatus.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DownloadStatus.swift; sourceTree = ""; }; 88A729AA28264AD100B5FE61 /* Loadify.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Loadify.app; sourceTree = BUILT_PRODUCTS_DIR; }; 88A729AD28264AD100B5FE61 /* LoadifyApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadifyApp.swift; sourceTree = ""; }; @@ -127,6 +129,7 @@ 88379935283A19F400DDBA79 /* Int+Extension.swift */, 883233862855F34000BF38B5 /* Double+Extension.swift */, 88379937283A1A0F00DDBA79 /* String+Extension.swift */, + 88498D4B29A285BE007303B0 /* Logger+Extension.swift */, ); path = Extensions; sourceTree = ""; @@ -416,6 +419,7 @@ 88220A89285DC9CC008260DE /* URLViewModel.swift in Sources */, 882ECF9B28CDB55E001F4C7D /* API.swift in Sources */, 88FDA6E02862C80D0028DCE9 /* Errors.swift in Sources */, + 88498D4C29A285BE007303B0 /* Logger+Extension.swift in Sources */, 88A729AE28264AD100B5FE61 /* LoadifyApp.swift in Sources */, 88379938283A1A0F00DDBA79 /* String+Extension.swift in Sources */, 88AFF4A528521F1300D00040 /* FileService.swift in Sources */, @@ -708,7 +712,7 @@ repositoryURL = "https://github.com/VishwaiOSDev/LoggerKit"; requirement = { kind = upToNextMinorVersion; - minimumVersion = 1.0.0; + minimumVersion = 1.1.1; }; }; 88D9D1E328C39EAB00D6EB79 /* XCRemoteSwiftPackageReference "FontKit" */ = { diff --git a/Loadify.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Loadify.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 01a053b..17b170a 100644 --- a/Loadify.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Loadify.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -23,8 +23,8 @@ "kind" : "remoteSourceControl", "location" : "git@github.com:VishwaiOSDev/LoggerKit.git", "state" : { - "revision" : "aacb930cbb6cb8d78be38c1860cf77fe200f77d3", - "version" : "1.0.0" + "revision" : "b35babbc1b649e5a9ad721a8d305f12c306763a8", + "version" : "1.1.1" } }, { @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "git@github.com:VishwaiOSDev/NetworkKit.git", "state" : { - "revision" : "22a9f9ab3aa55c2fb8e89c792c62ab230d0d1fd7", - "version" : "0.1.6" + "revision" : "649c23301583c619f44f3e2bd38b406f0a03fbd3", + "version" : "0.1.8" } } ], diff --git a/Loadify/App/LoadifyApp.swift b/Loadify/App/LoadifyApp.swift index 45d727c..03bbfd1 100644 --- a/Loadify/App/LoadifyApp.swift +++ b/Loadify/App/LoadifyApp.swift @@ -18,6 +18,7 @@ struct LoadifyApp: App { init() { FontKit.registerInter() + Logger.configure() } var body: some Scene { diff --git a/Loadify/Others/Extensions/Logger+Extension.swift b/Loadify/Others/Extensions/Logger+Extension.swift new file mode 100644 index 0000000..a87ce54 --- /dev/null +++ b/Loadify/Others/Extensions/Logger+Extension.swift @@ -0,0 +1,25 @@ +// +// Logger+Extension.swift +// Loadify +// +// Created by Vishweshwaran on 19/02/23. +// + +import Foundation +import NetworkKit +import LoggerKit + +typealias Logger = LoadifyApp.Logger + +extension LoadifyApp { + + struct Logger: Loggable { + + static var logTag: String { "Loadify" } + static var logConfig: LoggerKit.LoggerConfig = .init(enable: true, severity: .info) + + static func configure() { + NetworkKit.Logger.logConfig = .init(enable: false) + } + } +}