From 9fe7c608484b111a92ff789e351db75c0f0496f2 Mon Sep 17 00:00:00 2001 From: Rakuyo Date: Wed, 22 Sep 2021 09:15:51 +0800 Subject: [PATCH 1/4] Remove some empty lines --- Sources/RaLog/Storable.swift | 3 --- Sources/RaLog/WebView+RaLog.swift | 1 - 2 files changed, 4 deletions(-) diff --git a/Sources/RaLog/Storable.swift b/Sources/RaLog/Storable.swift index c332f43..dd8acc7 100644 --- a/Sources/RaLog/Storable.swift +++ b/Sources/RaLog/Storable.swift @@ -210,10 +210,8 @@ public extension Storable { } case .continuous(let count): - switch result { case .success: - // reset to 0 failureCount = 0 @@ -225,7 +223,6 @@ public extension Storable { } case .grandTotal(let count): - switch result { case .success: break case .failure(let error): diff --git a/Sources/RaLog/WebView+RaLog.swift b/Sources/RaLog/WebView+RaLog.swift index 066dda5..a2bee71 100644 --- a/Sources/RaLog/WebView+RaLog.swift +++ b/Sources/RaLog/WebView+RaLog.swift @@ -30,7 +30,6 @@ public extension RaLogCompatible { extension WKWebView: RaLogCompatible {} public extension RaLogWrapper where Base: WKWebView { - /// Add script to WKWebView for intercepting `console.log`. /// /// When the post closure is `nil` (default), the following method will be used to pass data to the native: From 982b3da9f4fb046c361f8a2902aa4909ee5e4b9e Mon Sep 17 00:00:00 2001 From: Rakuyo Date: Wed, 22 Sep 2021 09:16:48 +0800 Subject: [PATCH 2/4] Remove some horizontal alignment --- Sources/RaLog/Built-in.swift | 12 ++++++------ Sources/RaLog/Log.swift | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Sources/RaLog/Built-in.swift b/Sources/RaLog/Built-in.swift index cb28802..3494ef0 100644 --- a/Sources/RaLog/Built-in.swift +++ b/Sources/RaLog/Built-in.swift @@ -10,12 +10,12 @@ import UIKit /// Built-in log identifier. public extension Log.Flag { - static let debug : Log.Flag = "👾 Debug" - static let warning : Log.Flag = "⚠️ Warning" - static let success : Log.Flag = "✅ Success" - static let error : Log.Flag = "❌ Error" - static let `deinit` : Log.Flag = "⁉️ Deinit" - static let jump : Log.Flag = "👋 Jump" + static let debug: Log.Flag = "👾 Debug" + static let warning: Log.Flag = "⚠️ Warning" + static let success: Log.Flag = "✅ Success" + static let error: Log.Flag = "❌ Error" + static let `deinit`: Log.Flag = "⁉️ Deinit" + static let jump: Log.Flag = "👋 Jump" } /// Built-in prefix log. diff --git a/Sources/RaLog/Log.swift b/Sources/RaLog/Log.swift index 213bf98..e0ba322 100644 --- a/Sources/RaLog/Log.swift +++ b/Sources/RaLog/Log.swift @@ -142,10 +142,10 @@ extension Log: Equatable { public static func == (lhs: Log, rhs: Log) -> Bool { // The `timestamp` & `line` is enough to filter out most cases, and finally judge the `logedStr`. return lhs.timestamp == rhs.timestamp - && lhs.line == rhs.line - && lhs.file == rhs.file - && lhs.safeLog == rhs.safeLog - && lhs.logedStr == rhs.logedStr + && lhs.line == rhs.line + && lhs.file == rhs.file + && lhs.safeLog == rhs.safeLog + && lhs.logedStr == rhs.logedStr } } From 81dd8ebd60ba4cbac572ff2179ad33a865da4b1f Mon Sep 17 00:00:00 2001 From: Rakuyo Date: Wed, 22 Sep 2021 09:17:45 +0800 Subject: [PATCH 3/4] [BREAK] Log storage operation in debug mode only --- Sources/RaLog/Printable.swift | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Sources/RaLog/Printable.swift b/Sources/RaLog/Printable.swift index fa4ce38..c6dba11 100644 --- a/Sources/RaLog/Printable.swift +++ b/Sources/RaLog/Printable.swift @@ -53,7 +53,6 @@ public extension Printable { @inline(__always) @discardableResult static func print(_ log: T) -> T { #if DEBUG - // 1. store format log log.logedStr = self.format(log) @@ -62,12 +61,11 @@ public extension Printable { Swift.print(log.logedStr) } - #endif - // 3. store if let storable = self as? Storable.Type { storable.store(log) } + #endif // 4. return return log From 8753ea9bd24557f082517e9f439f79c6de60f39d Mon Sep 17 00:00:00 2001 From: Rakuyo Date: Wed, 22 Sep 2021 09:20:24 +0800 Subject: [PATCH 4/4] [Release Script] Version updated to 1.5.3 202109220919 --- RaLog.podspec | 2 +- RaLog.xcodeproj/project.pbxproj | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/RaLog.podspec b/RaLog.podspec index 5e2e964..a6b8f28 100755 --- a/RaLog.podspec +++ b/RaLog.podspec @@ -5,7 +5,7 @@ Pod::Spec.new do |s| s.name = 'RaLog' - s.version = '1.5.2' + s.version = '1.5.3' s.summary = 'A logging framework.' diff --git a/RaLog.xcodeproj/project.pbxproj b/RaLog.xcodeproj/project.pbxproj index 82512b7..810f9f3 100644 --- a/RaLog.xcodeproj/project.pbxproj +++ b/RaLog.xcodeproj/project.pbxproj @@ -388,7 +388,7 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 202109091127; + CURRENT_PROJECT_VERSION = 202109220919; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 5C9JW4S9DE; DYLIB_COMPATIBILITY_VERSION = 1; @@ -402,7 +402,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 1.5.2; + MARKETING_VERSION = 1.5.3; PRODUCT_BUNDLE_IDENTIFIER = com.rakuyo.RaLog; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; @@ -415,7 +415,7 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 202109091127; + CURRENT_PROJECT_VERSION = 202109220919; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 5C9JW4S9DE; DYLIB_COMPATIBILITY_VERSION = 1; @@ -429,7 +429,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 1.5.2; + MARKETING_VERSION = 1.5.3; PRODUCT_BUNDLE_IDENTIFIER = com.rakuyo.RaLog; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES;