gpt4 book ai didi

ios - swift ,iOS 14 : where to find device logs?

转载 作者:行者123 更新时间:2023-12-05 06:47:56 26 4
gpt4 key购买 nike

我正在尝试调试我的应用,我需要记录一些信息。这是我的代码:

let logger = Logger(subsystem: Bundle.main.bundleIdentifier!, category: "main")
logger.log("One")
logger.notice("Two")
os_log("Three")

但是当我按下 Cmd-Shift-2 -> View Device Logs 之后,它没有显示任何与我的应用相关的日志。我想在某个地方阅读这些消息 - 我该怎么做?

最佳答案

您应该能够使用 macOS console.app 查看您的日志。

其他信息 » 探索 Swift 中的日志记录:https://developer.apple.com/videos/play/wwdc2020/10168/

关于ios - swift ,iOS 14 : where to find device logs?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66959059/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com