Files
NetNewsWire/Technotes/Logs.md
2023-02-07 23:47:36 -05:00

370 B

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:


import Foundation
import RSCore

class Sample: Logging {

    init() {
        logger.debug("Init")
    }
}