From 485d9fde5877d030bf55af4f5152b2b1a5ef1357 Mon Sep 17 00:00:00 2001 From: leogdion Date: Sun, 26 Nov 2023 20:21:20 -0500 Subject: [PATCH] Adding Example Use Code (#11) --- README.md | 13 +++++++++++-- .../FelinePine/Documentation.docc/Documentation.md | 12 +++++++++++- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 06cdd76..500188a 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,11 @@ internal struct VirtualMachine: Loggable { internal typealias LoggingSystemType = BushelLogging internal static let loggingCategory: BushelLogging.Category = .machine + + func run () { + Self.logger.debug("Starting Run") + ... + } ... } ``` @@ -113,7 +118,11 @@ Now you can simply use the _new_ `Loggable` type: ```swift internal struct VirtualMachine: BushelLoggable { internal static let loggingCategory: BushelLogging.Category = .machine - ... + + func run () { + Self.logger.debug("Starting Run") + ... + } } ``` @@ -123,4 +132,4 @@ Further documentation is available at [the Swift Package Index.](https://swiftpa # License -This code is distributed under the MIT license. See the [LICENSE](https://github.com/brightdigit/FelinePine/LICENSE) file for more info. \ No newline at end of file +This code is distributed under the MIT license. See the [LICENSE](https://github.com/brightdigit/FelinePine/LICENSE) file for more info. diff --git a/Sources/FelinePine/Documentation.docc/Documentation.md b/Sources/FelinePine/Documentation.docc/Documentation.md index be441ed..e7f4030 100644 --- a/Sources/FelinePine/Documentation.docc/Documentation.md +++ b/Sources/FelinePine/Documentation.docc/Documentation.md @@ -64,6 +64,12 @@ internal struct VirtualMachine: Loggable { internal typealias LoggingSystemType = BushelLogging internal static let loggingCategory: BushelLogging.Category = .machine + + func run () { + Self.logger.debug("Starting Run") + ... + } + ... } ``` @@ -82,7 +88,11 @@ Now you can simply use the _new_ `Loggable` type: ```swift internal struct VirtualMachine: BushelLoggable { internal static let loggingCategory: BushelLogging.Category = .machine - ... + + func run () { + Self.logger.debug("Starting Run") + ... + } } ```