作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我们正在开发 iOS 应用程序。我们要创建 NSLog 的自定义类,它将定义四种类型的消息 iOS 应用系统,如
1. Error
2. Fault
3. Info message
4. Warnings
是否有一些 Apple 标准文档来创建此类消息定义或如何为我们的 App 日志消息创建特殊情况?
最佳答案
这是不可能用 NSLog()
完成的。
如果您想使用日志级别,您应该在 iOS 10+ 上使用 libtrace 中的 os_log()
或在早期版本上使用 ASL。
关于ios - 如何在 Objective C 中将 NSLog 分类为错误、警告、消息和故障类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42619298/
我是一名优秀的程序员,十分优秀!