From abd8aeceba97b3f798b35574adfef84ef476c25b Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Sun, 4 Sep 2022 21:47:55 +0800 Subject: [PATCH] Adds Logs technote --- Technotes/Logs.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Technotes/Logs.md diff --git a/Technotes/Logs.md b/Technotes/Logs.md new file mode 100644 index 000000000..c9bbdf20c --- /dev/null +++ b/Technotes/Logs.md @@ -0,0 +1,20 @@ +# Logs + +`RSCore` contains a protocol called `Logging`. Classes and Structs that conform to `Logging` have a `logger` variable that the Class or Struct can use instead of importing `os.log` and creating a `var log = Logger(..)` variable. + +Example: + +```swift + + import Foundation + import RSCore + + class Sample: Logging { + + init() { + logger.debug("Init") + } + } + +} +```