【问题标题】:Swift Unified LoggingSwift 统一日志记录
【发布时间】:2018-05-09 20:36:50
【问题描述】:

我正在寻找一些有关如何正确快速登录的信息。我找到了统一日志记录:https://developer.apple.com/documentation/os/logging

在尝试时,我不知道如何仅查看我定义的子系统和类别的日志。 ios模拟器的系统日志有没有办法在控制台中只包含与应用程序相关的日志?我在控制台和模拟器的系统日志中都看不到应用程序日志。

这是我的代码:

let customLogger = OSLog(subsystem: "com.myapp", category: "CustomLogs")
os_log("Test log message.", log: customLogger, type: .debug)

【问题讨论】:

标签: swift logging oslog


【解决方案1】:

如果你还在寻找答案。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-05-10
    • 1970-01-01
    • 1970-01-01
    • 2014-10-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-10-26
    相关资源
    最近更新 更多