From b48b2c963deacd68f6ac421ee9cad59efb2daab7 Mon Sep 17 00:00:00 2001 From: Daniel Strobusch <1847260+dastrobu@users.noreply.github.com> Date: Tue, 4 Dec 2018 16:11:36 +0100 Subject: [PATCH 1/2] updated docs on logger and updated dependencies for logging. (#3) --- Package.resolved | 8 ++++---- Package.swift | 4 ++-- README.md | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Package.resolved b/Package.resolved index 13c5557..257e5b3 100644 --- a/Package.resolved +++ b/Package.resolved @@ -6,8 +6,8 @@ "repositoryURL": "https://github.com/IBM-Swift/HeliumLogger.git", "state": { "branch": null, - "revision": "2afeb4c02f5a48a7fbd081fe8607b91eeebd7ecb", - "version": "1.7.1" + "revision": "5ad546a39376b911a6cd4b06e8cadf60aa9e9472", + "version": "1.8.0" } }, { @@ -15,8 +15,8 @@ "repositoryURL": "https://github.com/IBM-Swift/LoggerAPI.git", "state": { "branch": null, - "revision": "5041f2673aa75d6e973d9b6bd3956bc5068387c8", - "version": "1.7.3" + "revision": "d0ccb4158b83f8692531892a9c894bb757593c6f", + "version": "1.8.0" } } ] diff --git a/Package.swift b/Package.swift index 9d554bb..6e4c3a6 100644 --- a/Package.swift +++ b/Package.swift @@ -12,8 +12,8 @@ let package = Package( ]), ], dependencies: [ - .package(url: "https://github.com/IBM-Swift/LoggerAPI.git", from: "1.7.0"), - .package(url: "https://github.com/IBM-Swift/HeliumLogger.git", from: "1.7.0") + .package(url: "https://github.com/IBM-Swift/LoggerAPI.git", from: "1.8.0"), + .package(url: "https://github.com/IBM-Swift/HeliumLogger.git", from: "1.8.0") ], targets: [ .target( diff --git a/README.md b/README.md index 899b267..356e5d7 100644 --- a/README.md +++ b/README.md @@ -533,7 +533,7 @@ To activate logging, one must configure a logger. A simple logger is e.g. ```swift import LoggerAPI import HeliumLogger -Log.log = HeliumLogger(.debug) +Log.logger = HeliumLogger(.debug) let argTree = ArgTree() try! argtree.parse() From 4fc936218228a1ccbdad21e57dfcbf6b4a25103f Mon Sep 17 00:00:00 2001 From: Daniel Strobusch <1847260+dastrobu@users.noreply.github.com> Date: Tue, 4 Dec 2018 16:39:48 +0100 Subject: [PATCH 2/2] made option constructor public. (#4) --- Sources/parsers/Option.swift | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Sources/parsers/Option.swift b/Sources/parsers/Option.swift index 2f0c001..84ab13a 100644 --- a/Sources/parsers/Option.swift +++ b/Sources/parsers/Option.swift @@ -88,14 +88,14 @@ open class OptionParser: ValueParser { } public class Option: OptionParser { - override init(longName: String? = nil, - shortName: String? = nil, - description: String? = nil, - longPrefix: String = "--", - shortPrefix: String = "-", - multiAllowed: Bool = false, - stopToken: String? = "--", - parsed: OnValueParsed? = nil) { + public override init(longName: String? = nil, + shortName: String? = nil, + description: String? = nil, + longPrefix: String = "--", + shortPrefix: String = "-", + multiAllowed: Bool = false, + stopToken: String? = "--", + parsed: OnValueParsed? = nil) { super.init(longName: longName, shortName: shortName, description: description, @@ -170,6 +170,7 @@ public class DoubleOption: OptionParser { throw OptionParseError.valueNotDoubleConvertible(option: self, atIndex: i, value: value) } } + public override var debugDescription: String { return "\(String(describing: DoubleOption.self))(\(aliases))" }