Adds Logs technote

This commit is contained in:
Stuart Breckenridge
2022-09-04 21:47:55 +08:00
parent 0dd4689bf0
commit abd8aeceba

20
Technotes/Logs.md Normal file
View File

@@ -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")
}
}
}
```