Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Commit 576a820

Browse files
committed
Comment all WPKitLog* usages in CoreAPI to get to build
1 parent b87c4c0 commit 576a820

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed
File renamed without changes.

Sources/CoreAPI/WordPressComOAuthClient.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public final class WordPressComOAuthClient: NSObject {
187187
.mapSuccess { response in
188188
let responseObject = try JSONSerialization.jsonObject(with: response.body)
189189

190-
WPKitLogVerbose("Received OAuth2 response: \(self.cleanedUpResponseForLogging(responseObject as AnyObject? ?? "nil" as AnyObject))")
190+
// WPKitLogVerbose("Received OAuth2 response: \(self.cleanedUpResponseForLogging(responseObject as AnyObject? ?? "nil" as AnyObject))")
191191

192192
guard let responseDictionary = responseObject as? [String: AnyObject] else {
193193
throw URLError(.cannotParseResponse)
@@ -380,7 +380,7 @@ public final class WordPressComOAuthClient: NSObject {
380380
.perform(request: builder, errorType: AuthenticationFailure.self)
381381
.mapUnacceptableStatusCodeError(AuthenticationFailure.init(response:body:))
382382
.mapSuccess { response in
383-
WPKitLogVerbose("Received Social Login Oauth response.")
383+
// WPKitLogVerbose("Received Social Login Oauth response.")
384384

385385
// Make sure we received expected data.
386386
let responseObject = try? JSONSerialization.jsonObject(with: response.body)
@@ -700,7 +700,7 @@ public final class WordPressComOAuthClient: NSObject {
700700
.mapSuccess { response in
701701
let responseObject = try JSONSerialization.jsonObject(with: response.body)
702702

703-
WPKitLogVerbose("Received Social Login Oauth response: \(self.cleanedUpResponseForLogging(responseObject as AnyObject? ?? "nil" as AnyObject))")
703+
// WPKitLogVerbose("Received Social Login Oauth response: \(self.cleanedUpResponseForLogging(responseObject as AnyObject? ?? "nil" as AnyObject))")
704704
guard let responseDictionary = responseObject as? [String: AnyObject],
705705
let responseData = responseDictionary["data"] as? [String: AnyObject],
706706
let authToken = responseData["bearer_token"] as? String else {

Sources/CoreAPI/WordPressOrgXMLRPCValidator.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,13 @@ open class WordPressOrgXMLRPCValidator: NSObject {
137137
xmlrpcURL = try urlForXMLRPCFromURLString(nextSite, addXMLRPC: true)
138138
originalXMLRPCURL = try urlForXMLRPCFromURLString(nextSite, addXMLRPC: false)
139139
} catch let error as NSError {
140-
WPKitLogError(error.localizedDescription)
140+
// WPKitLogError(error.localizedDescription)
141141
errorHandler(error)
142142
return
143143
}
144144

145145
validateXMLRPCURL(xmlrpcURL, success: success, failure: { (error) in
146-
WPKitLogError(error.localizedDescription)
146+
// WPKitLogError(error.localizedDescription)
147147
if (error.domain == NSURLErrorDomain && error.code == NSURLErrorUserCancelledAuthentication) ||
148148
(error.domain == NSURLErrorDomain && error.code == NSURLErrorCannotFindHost) ||
149149
(error.domain == NSURLErrorDomain && error.code == NSURLErrorNetworkConnectionLost) ||
@@ -152,12 +152,12 @@ open class WordPressOrgXMLRPCValidator: NSObject {
152152
return
153153
}
154154
// Try the original given url as an XML-RPC endpoint
155-
WPKitLogError("Try the original given url as an XML-RPC endpoint: \(originalXMLRPCURL)")
155+
// WPKitLogError("Try the original given url as an XML-RPC endpoint: \(originalXMLRPCURL)")
156156
self.validateXMLRPCURL(originalXMLRPCURL, success: success, failure: { (error) in
157-
WPKitLogError(error.localizedDescription)
157+
// WPKitLogError(error.localizedDescription)
158158
// Fetch the original url and look for the RSD link
159159
self.guessXMLRPCURLFromHTMLURL(originalXMLRPCURL, success: success, failure: { (error) in
160-
WPKitLogError(error.localizedDescription)
160+
// WPKitLogError(error.localizedDescription)
161161

162162
errorHandler(error)
163163
})
@@ -193,7 +193,7 @@ open class WordPressOrgXMLRPCValidator: NSObject {
193193

194194
if baseURL.lastPathComponent != "xmlrpc.php" && addXMLRPC {
195195
// Assume the given url is the home page and XML-RPC sits at /xmlrpc.php
196-
WPKitLogInfo("Assume the given url is the home page and XML-RPC sits at /xmlrpc.php")
196+
// WPKitLogInfo("Assume the given url is the home page and XML-RPC sits at /xmlrpc.php")
197197
resultURLString = "\(resultURLString)/xmlrpc.php"
198198
}
199199

@@ -263,7 +263,7 @@ open class WordPressOrgXMLRPCValidator: NSObject {
263263
private func guessXMLRPCURLFromHTMLURL(_ htmlURL: URL,
264264
success: @escaping (_ xmlrpcURL: URL) -> Void,
265265
failure: @escaping (_ error: NSError) -> Void) {
266-
WPKitLogInfo("Fetch the original url and look for the RSD link by using RegExp")
266+
// WPKitLogInfo("Fetch the original url and look for the RSD link by using RegExp")
267267

268268
var isWpSite = false
269269
let session = URLSession(configuration: URLSessionConfiguration.ephemeral)
@@ -338,7 +338,7 @@ open class WordPressOrgXMLRPCValidator: NSObject {
338338
private func guessXMLRPCURLFromRSD(_ rsd: String,
339339
success: @escaping (_ xmlrpcURL: URL) -> Void,
340340
failure: @escaping (_ error: NSError) -> Void) {
341-
WPKitLogInfo("Parse the RSD document at the following URL: \(rsd)")
341+
// WPKitLogInfo("Parse the RSD document at the following URL: \(rsd)")
342342
guard let rsdURL = URL(string: rsd) else {
343343
failure(WordPressOrgXMLRPCValidatorError.invalid as NSError)
344344
return
@@ -358,7 +358,7 @@ open class WordPressOrgXMLRPCValidator: NSObject {
358358
failure(WordPressOrgXMLRPCValidatorError.invalid as NSError)
359359
return
360360
}
361-
WPKitLogInfo("Bingo! We found the WordPress XML-RPC element: \(xmlrpcURL)")
361+
// WPKitLogInfo("Bingo! We found the WordPress XML-RPC element: \(xmlrpcURL)")
362362
self.validateXMLRPCURL(xmlrpcURL, success: success, failure: failure)
363363
})
364364
dataTask.resume()

Sources/CoreAPI/WordPressRSDParser.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ open class WordPressRSDParser: NSObject, XMLParserDelegate {
4747
}
4848

4949
open func parser(_ parser: XMLParser, parseErrorOccurred parseError: Error) {
50-
WPKitLogInfo("Error parsing RSD: \(parseError)")
50+
// WPKitLogInfo("Error parsing RSD: \(parseError)")
5151
}
5252

5353
}

0 commit comments

Comments
 (0)