Open utterances-bot opened 7 months ago
The article is well written, 👍🏻! Is it possible to intercept print without to parameter? Can it be achieved through method swizzling?
I found how to intercept print without to parameter: use: _playgroundPrintHook https://oleb.net/blog/2016/09/playground-print-hook/
I found that rewriting the print function can intercept all prints without using _playgroundPrintHook
public func print(_ items: Any..., separator: String = " ", terminator: String = "\n") {
Swift.print(items, separator: separator, terminator: terminator)
}
Swift's print in Depth • Andy Ibanez
https://www.andyibanez.com/posts/swift-print-in-depth/