Skip to content

Commit

Permalink
Merge pull request #204 from watson-developer-cloud/remove-xcglogger
Browse files Browse the repository at this point in the history
Remove XCGLogger
  • Loading branch information
glennrfisher committed Mar 16, 2016
2 parents 6866c0f + 32fc739 commit fe9b0d2
Show file tree
Hide file tree
Showing 10 changed files with 5 additions and 154 deletions.
1 change: 0 additions & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
github "Alamofire/Alamofire" == 3.1.2
github "DaveWoodCom/XCGLogger" == 3.1.1
github "Hearst-DD/ObjectMapper" == 1.0.1
github "rhodgkins/SwiftHTTPStatusCodes" == 2.0.1
github "daltoniam/Starscream" == 1.1.1
Expand Down
1 change: 0 additions & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ github "Alamofire/Alamofire" "3.1.2"
github "Hearst-DD/ObjectMapper" "1.0.1"
github "daltoniam/Starscream" "1.1.1"
github "rhodgkins/SwiftHTTPStatusCodes" "2.0.1"
github "DaveWoodCom/XCGLogger" "Version_3.1.1"
github "tristanhimmelman/AlamofireObjectMapper" "2.1.3"
10 changes: 0 additions & 10 deletions WatsonDeveloperCloud.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@
7A0F97041C232B96004C01C0 /* NSError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A0F966E1C232B96004C01C0 /* NSError.swift */; };
7A0F970A1C232B96004C01C0 /* CoreResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A0F96761C232B96004C01C0 /* CoreResponse.swift */; };
7A0F970B1C232B96004C01C0 /* HTTPMethods.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A0F96771C232B96004C01C0 /* HTTPMethods.swift */; };
7A0F970C1C232B96004C01C0 /* Log.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A0F96781C232B96004C01C0 /* Log.swift */; };
7A0F970D1C232B96004C01C0 /* MediaType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A0F96791C232B96004C01C0 /* MediaType.swift */; };
7A0F970E1C232B96004C01C0 /* NetworkUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A0F967A1C232B96004C01C0 /* NetworkUtils.swift */; };
7A0F970F1C232B96004C01C0 /* Transformation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A0F967B1C232B96004C01C0 /* Transformation.swift */; };
Expand Down Expand Up @@ -145,13 +144,11 @@
7A0F97391C232D02004C01C0 /* HTTPStatusCodes.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7A0F97331C232D02004C01C0 /* HTTPStatusCodes.framework */; };
7A0F973A1C232D02004C01C0 /* ObjectMapper.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7A0F97341C232D02004C01C0 /* ObjectMapper.framework */; };
7A0F973B1C232D02004C01C0 /* Starscream.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7A0F97351C232D02004C01C0 /* Starscream.framework */; };
7A0F973C1C232D02004C01C0 /* XCGLogger.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7A0F97361C232D02004C01C0 /* XCGLogger.framework */; };
7A0F973E1C232F14004C01C0 /* Alamofire.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 7A0F97311C232D02004C01C0 /* Alamofire.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
7A0F973F1C232F14004C01C0 /* AlamofireObjectMapper.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 7A0F97321C232D02004C01C0 /* AlamofireObjectMapper.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
7A0F97401C232F14004C01C0 /* HTTPStatusCodes.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 7A0F97331C232D02004C01C0 /* HTTPStatusCodes.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
7A0F97411C232F14004C01C0 /* ObjectMapper.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 7A0F97341C232D02004C01C0 /* ObjectMapper.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
7A0F97421C232F14004C01C0 /* Starscream.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 7A0F97351C232D02004C01C0 /* Starscream.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
7A0F97431C232F14004C01C0 /* XCGLogger.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 7A0F97361C232D02004C01C0 /* XCGLogger.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
7A19DC931C597B260082ED38 /* SpeechToTextConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A19DC921C597B260082ED38 /* SpeechToTextConstants.swift */; };
7A19DC971C5980780082ED38 /* SpeechToTextTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A19DC951C5980720082ED38 /* SpeechToTextTests.swift */; };
7A19DC9C1C5983390082ED38 /* SpeechSample.flac in Resources */ = {isa = PBXBuildFile; fileRef = 7A19DC991C5983390082ED38 /* SpeechSample.flac */; };
Expand Down Expand Up @@ -200,7 +197,6 @@
7A0F97401C232F14004C01C0 /* HTTPStatusCodes.framework in CopyFiles */,
7A0F97411C232F14004C01C0 /* ObjectMapper.framework in CopyFiles */,
7A0F97421C232F14004C01C0 /* Starscream.framework in CopyFiles */,
7A0F97431C232F14004C01C0 /* XCGLogger.framework in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -333,7 +329,6 @@
7A0F966E1C232B96004C01C0 /* NSError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSError.swift; sourceTree = "<group>"; };
7A0F96761C232B96004C01C0 /* CoreResponse.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CoreResponse.swift; sourceTree = "<group>"; };
7A0F96771C232B96004C01C0 /* HTTPMethods.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HTTPMethods.swift; sourceTree = "<group>"; };
7A0F96781C232B96004C01C0 /* Log.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Log.swift; sourceTree = "<group>"; };
7A0F96791C232B96004C01C0 /* MediaType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MediaType.swift; sourceTree = "<group>"; };
7A0F967A1C232B96004C01C0 /* NetworkUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkUtils.swift; sourceTree = "<group>"; };
7A0F967B1C232B96004C01C0 /* Transformation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Transformation.swift; sourceTree = "<group>"; };
Expand All @@ -348,7 +343,6 @@
7A0F97331C232D02004C01C0 /* HTTPStatusCodes.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = HTTPStatusCodes.framework; path = Carthage/Build/iOS/HTTPStatusCodes.framework; sourceTree = "<group>"; };
7A0F97341C232D02004C01C0 /* ObjectMapper.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ObjectMapper.framework; path = Carthage/Build/iOS/ObjectMapper.framework; sourceTree = "<group>"; };
7A0F97351C232D02004C01C0 /* Starscream.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Starscream.framework; path = Carthage/Build/iOS/Starscream.framework; sourceTree = "<group>"; };
7A0F97361C232D02004C01C0 /* XCGLogger.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCGLogger.framework; path = Carthage/Build/iOS/XCGLogger.framework; sourceTree = "<group>"; };
7A19DC921C597B260082ED38 /* SpeechToTextConstants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SpeechToTextConstants.swift; path = WatsonDeveloperCloud/SpeechToText/SpeechToTextConstants.swift; sourceTree = "<group>"; };
7A19DC951C5980720082ED38 /* SpeechToTextTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SpeechToTextTests.swift; path = WatsonDeveloperCloud/SpeechToText/Tests/SpeechToTextTests.swift; sourceTree = "<group>"; };
7A19DC991C5983390082ED38 /* SpeechSample.flac */ = {isa = PBXFileReference; lastKnownFileType = file; path = SpeechSample.flac; sourceTree = "<group>"; };
Expand Down Expand Up @@ -381,7 +375,6 @@
buildActionMask = 2147483647;
files = (
7A0F973A1C232D02004C01C0 /* ObjectMapper.framework in Frameworks */,
7A0F973C1C232D02004C01C0 /* XCGLogger.framework in Frameworks */,
7A0F973B1C232D02004C01C0 /* Starscream.framework in Frameworks */,
7A0F96E91C232B96004C01C0 /* libopus.a in Frameworks */,
7A0F97371C232D02004C01C0 /* Alamofire.framework in Frameworks */,
Expand Down Expand Up @@ -812,7 +805,6 @@
children = (
7A0F96761C232B96004C01C0 /* CoreResponse.swift */,
7A0F96771C232B96004C01C0 /* HTTPMethods.swift */,
7A0F96781C232B96004C01C0 /* Log.swift */,
7A0F96791C232B96004C01C0 /* MediaType.swift */,
7A0F967A1C232B96004C01C0 /* NetworkUtils.swift */,
7A0F967B1C232B96004C01C0 /* Transformation.swift */,
Expand All @@ -829,7 +821,6 @@
7A0F97331C232D02004C01C0 /* HTTPStatusCodes.framework */,
7A0F97341C232D02004C01C0 /* ObjectMapper.framework */,
7A0F97351C232D02004C01C0 /* Starscream.framework */,
7A0F97361C232D02004C01C0 /* XCGLogger.framework */,
);
name = Frameworks;
sourceTree = "<group>";
Expand Down Expand Up @@ -1100,7 +1091,6 @@
7A0F970F1C232B96004C01C0 /* Transformation.swift in Sources */,
7A0F96CB1C232B96004C01C0 /* NaturalLanguageClassifier.swift in Sources */,
7A0F97121C232B96004C01C0 /* WatsonCoreConstants.swift in Sources */,
7A0F970C1C232B96004C01C0 /* Log.swift in Sources */,
7ACB0D4C1C878D5400861CCC /* SpeechToTextWordAlternativeResult.swift in Sources */,
7A19DC931C597B260082ED38 /* SpeechToTextConstants.swift in Sources */,
7A0F96D71C232B96004C01C0 /* PersonalityInsightsError.swift in Sources */,
Expand Down
15 changes: 4 additions & 11 deletions WatsonDeveloperCloud/AlchemyVision/AlchemyVision.swift
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,12 @@ public class AlchemyVision: AlchemyService {
}

NetworkUtils.performBasicAuthFileUpload(visionUrl, fileURL: urlObject.0!.url!, parameters: params, completionHandler: {response in
var error:NSError?

let fileManager = NSFileManager.defaultManager()
do {
try fileManager.removeItemAtPath(urlObject.0!.path)
}
catch let catchError as NSError {
error = catchError
Log.sharedLogger.error("\(error)")
}
catch { }

var imageKeywords = ImageKeyWords()
if case let data as Dictionary<String,AnyObject> = response.data {
Expand Down Expand Up @@ -208,18 +205,14 @@ public class AlchemyVision: AlchemyService {
}

NetworkUtils.performBasicAuthFileUpload(visionUrl, fileURL: urlObject.0!.url!, parameters: params, completionHandler: {response in
var error:NSError?

let fileManager = NSFileManager.defaultManager()

// delete temp file from documents directory
do {
Log.sharedLogger.error(urlObject.0!.path)
try fileManager.removeItemAtPath(urlObject.0!.path)
}
catch let catchError as NSError {
error = catchError
Log.sharedLogger.error("\(error)")
}
catch { }

if case let data as Dictionary<String,AnyObject> = response.data {
let imageFaceTags = Mapper<ImageFaceTags>().map(data)
Expand Down
3 changes: 0 additions & 3 deletions WatsonDeveloperCloud/AlchemyVision/Models/ImageFace.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ public struct ImageFace : Mappable {
public init?(_ map: Map) {}

public mutating func mapping(map: Map) {

Log.sharedLogger.error("ERRRRRR \(map[""])")

height <- (map["height"], Transformation.stringToInt)
width <- (map["width"], Transformation.stringToInt)
positionX <- (map["positionX"], Transformation.anyObjectToInt)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ class LanguageTranslationTests: XCTestCase {

guard error == nil else {
XCTFail("Expected nil error.")
Log.sharedLogger.error("\(error)")
creationExpectation.fulfill()
deletionExpectation.fulfill()
return
Expand Down
3 changes: 0 additions & 3 deletions WatsonDeveloperCloud/WatsonCore/Utilities/CoreResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,6 @@ public struct CoreResponse: Mappable, CustomStringConvertible {
}
} catch {

Log.sharedLogger.info("Non-JSON payload received")

// When binary data is received
coreResponseDictionary.updateValue(data, forKey: "data")
}
Expand All @@ -141,7 +139,6 @@ public struct CoreResponse: Mappable, CustomStringConvertible {
coreResponseDictionary.updateValue(NSHTTPURLResponse.localizedStringForStatusCode(response.statusCode), forKey: "responseInfo")
}
let coreResponse = Mapper<CoreResponse>().map(coreResponseDictionary)!
Log.sharedLogger.debug("\(coreResponse)")
return coreResponse
}

Expand Down
94 changes: 0 additions & 94 deletions WatsonDeveloperCloud/WatsonCore/Utilities/Log.swift

This file was deleted.

Loading

0 comments on commit fe9b0d2

Please sign in to comment.