gpt4 book ai didi

ios - [RestKit v0.20.3] : Logging to file

转载 作者:行者123 更新时间:2023-11-28 22:03:24 29 4
gpt4 key购买 nike

我希望 RestKit 将其错误和警告消息记录到一个文件中。

它使用 NSLog 正确地记录了这些消息,但仅此而已;虽然我在我的项目中添加了以下两个 pod:

pod 'LibComponentLogging-pods'
pod 'LibComponentLogging-LogFile'

我设法将正常日志记录到一个文件中:

lcl_log(lcl_cMain, lcl_vInfo, @"log message %d", 2);

例如,此日志显示在创建的日志文件中,但不显示在 RestKit 日志中。

我怎样才能让 RestKit 也将其日志重定向到同一个文件?

最佳答案

查看示例 2 https://github.com/aharren/LibComponentLogging-configure

pod install 之后,您可以运行 lcl_configure pod,它将 RestKit pod 与您的 LibComponentLogging pod 集成。然后,RestKit 将使用通过您的 Podfile 配置的日志记录后端。

lcl_configure 将通过 LibComponentLogging-pods pod 安装,并且可以通过 Pods/LibComponentLogging-pods/configure/lcl_configure pod 调用。

关于ios - [RestKit v0.20.3] : Logging to file,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24555430/

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