macOS-NSFileHandle之stdout,stderr

参考:How can I output to STDERR with Swift?

  • stderr: NSFileHandle.fileHandleWithStandardError()
    或者
1
2
3
+ (void)logerr:(NSString *)msg{
fputs([msg cStringUsingEncoding:NSUTF8StringEncoding], stderr);
}

macOS-NSFileHandle之stdout,stderr
https://dnacore.github.io/post/62f45487-f3f6-465b-9c13-331f29e5f609.html
作者
DNACore
发布于
2022年1月10日
更新于
2023年11月30日
许可协议