停止来自蓝牙 GKSession 的不相关日志?

发布于 2024-11-08 06:17:38 字数 3102 浏览 0 评论 0原文

如何在GKSession开始搜索时停止以下代码?

 BTM: posting notification BluetoothAvailabilityChangedNotification
2011-05-17 20:25:05.666 BLUConnect[2120:307] BTM: Adding new device 0x110db0 Jahangir Nawaz’s iPhone 00:23:DF:3C:BC:5B 0xf5210003
2011-05-17 20:25:05.669 BLUConnect[2120:307] BTM: _btServiceEventCallback: service = 0xffffffff eventType = 0 event = 0 result = 0
2011-05-17 20:25:06.406 BLUConnect[2120:307] BTM: _btServiceEventCallback: service = 0x800 eventType = 0 event = 1 result = 0
2011-05-17 20:25:06.466 BLUConnect[2120:307] BTM: _btServiceEventCallback: service = 0x800 eventType = 0 event = 11 result = 305
2011-05-17 20:25:06.491 BLUConnect[2120:307] BTM: received BT_SERVICE_CONNECT event type with 0 currently connected services
2011-05-17 20:25:06.494 BLUConnect[2120:307] BTM: posting notification BluetoothDeviceConnectFailedNotification
2011-05-17 20:25:07.467 BLUConnect[2120:307] BTM: received BT_LOCAL_DEVICE_CONNECTION_STATUS_CHANGED event
2011-05-17 20:25:07.469 BLUConnect[2120:307] BTM: posting notification BluetoothConnectionStatusChangedNotification
2011-05-17 20:25:11.571 BLUConnect[2120:307] BTM: _btServiceEventCallback: service = 0xffffffff eventType = 0 event = 0 result = 0
2011-05-17 20:25:12.576 BLUConnect[2120:307] BTM: _btServiceEventCallback: service = 0x800 eventType = 0 event = 1 result = 0
2011-05-17 20:25:13.581 BLUConnect[2120:307] BTM: _btServiceEventCallback: service = 0x800 eventType = 0 event = 11 result = 305
2011-05-17 20:25:13.590 BLUConnect[2120:307] BTM: received BT_SERVICE_CONNECT event type with 0 currently connected services
2011-05-17 20:25:13.591 BLUConnect[2120:307] BTM: posting notification BluetoothDeviceConnectFailedNotification
2011-05-17 20:25:14.587 BLUConnect[2120:307] BTM: received BT_LOCAL_DEVICE_CONNECTION_STATUS_CHANGED event
2011-05-17 20:25:14.589 BLUConnect[2120:307] BTM: posting notification BluetoothConnectionStatusChangedNotification
2011-05-17 20:25:15.594 BLUConnect[2120:307] BTM: _btServiceEventCallback: service = 0xffffffff eventType = 0 event = 0 result = 0
2011-05-17 20:25:16.598 BLUConnect[2120:307] BTM: _btServiceEventCallback: service = 0x800 eventType = 0 event = 1 result = 0
2011-05-17 20:25:17.604 BLUConnect[2120:307] BTM: _btServiceEventCallback: service = 0x800 eventType = 0 event = 11 result = 305
2011-05-17 20:25:17.613 BLUConnect[2120:307] BTM: received BT_SERVICE_CONNECT event type with 0 currently connected services
2011-05-17 20:25:17.614 BLUConnect[2120:307] BTM: posting notification BluetoothDeviceConnectFailedNotification
2011-05-17 20:25:18.611 BLUConnect[2120:307] BTM: received BT_LOCAL_DEVICE_CONNECTION_STATUS_CHANGED event
2011-05-17 20:25:18.613 BLUConnect[2120:307] BTM: posting notification BluetoothConnectionStatusChangedNotification
2011-05-17 20:25:19.618 BLUConnect[2120:307] BTM: _btServiceEventCallback: service = 0xffffffff eventType = 0 event = 0 result = 0
2011-05-17 20:25:20.624 BLUConnect[2120:307] BTM: _btServiceEventCallback: service = 0x800 eventType = 0 event = 1 result = 0

How to stop the following code when GKSession starts search?

 BTM: posting notification BluetoothAvailabilityChangedNotification
2011-05-17 20:25:05.666 BLUConnect[2120:307] BTM: Adding new device 0x110db0 Jahangir Nawaz’s iPhone 00:23:DF:3C:BC:5B 0xf5210003
2011-05-17 20:25:05.669 BLUConnect[2120:307] BTM: _btServiceEventCallback: service = 0xffffffff eventType = 0 event = 0 result = 0
2011-05-17 20:25:06.406 BLUConnect[2120:307] BTM: _btServiceEventCallback: service = 0x800 eventType = 0 event = 1 result = 0
2011-05-17 20:25:06.466 BLUConnect[2120:307] BTM: _btServiceEventCallback: service = 0x800 eventType = 0 event = 11 result = 305
2011-05-17 20:25:06.491 BLUConnect[2120:307] BTM: received BT_SERVICE_CONNECT event type with 0 currently connected services
2011-05-17 20:25:06.494 BLUConnect[2120:307] BTM: posting notification BluetoothDeviceConnectFailedNotification
2011-05-17 20:25:07.467 BLUConnect[2120:307] BTM: received BT_LOCAL_DEVICE_CONNECTION_STATUS_CHANGED event
2011-05-17 20:25:07.469 BLUConnect[2120:307] BTM: posting notification BluetoothConnectionStatusChangedNotification
2011-05-17 20:25:11.571 BLUConnect[2120:307] BTM: _btServiceEventCallback: service = 0xffffffff eventType = 0 event = 0 result = 0
2011-05-17 20:25:12.576 BLUConnect[2120:307] BTM: _btServiceEventCallback: service = 0x800 eventType = 0 event = 1 result = 0
2011-05-17 20:25:13.581 BLUConnect[2120:307] BTM: _btServiceEventCallback: service = 0x800 eventType = 0 event = 11 result = 305
2011-05-17 20:25:13.590 BLUConnect[2120:307] BTM: received BT_SERVICE_CONNECT event type with 0 currently connected services
2011-05-17 20:25:13.591 BLUConnect[2120:307] BTM: posting notification BluetoothDeviceConnectFailedNotification
2011-05-17 20:25:14.587 BLUConnect[2120:307] BTM: received BT_LOCAL_DEVICE_CONNECTION_STATUS_CHANGED event
2011-05-17 20:25:14.589 BLUConnect[2120:307] BTM: posting notification BluetoothConnectionStatusChangedNotification
2011-05-17 20:25:15.594 BLUConnect[2120:307] BTM: _btServiceEventCallback: service = 0xffffffff eventType = 0 event = 0 result = 0
2011-05-17 20:25:16.598 BLUConnect[2120:307] BTM: _btServiceEventCallback: service = 0x800 eventType = 0 event = 1 result = 0
2011-05-17 20:25:17.604 BLUConnect[2120:307] BTM: _btServiceEventCallback: service = 0x800 eventType = 0 event = 11 result = 305
2011-05-17 20:25:17.613 BLUConnect[2120:307] BTM: received BT_SERVICE_CONNECT event type with 0 currently connected services
2011-05-17 20:25:17.614 BLUConnect[2120:307] BTM: posting notification BluetoothDeviceConnectFailedNotification
2011-05-17 20:25:18.611 BLUConnect[2120:307] BTM: received BT_LOCAL_DEVICE_CONNECTION_STATUS_CHANGED event
2011-05-17 20:25:18.613 BLUConnect[2120:307] BTM: posting notification BluetoothConnectionStatusChangedNotification
2011-05-17 20:25:19.618 BLUConnect[2120:307] BTM: _btServiceEventCallback: service = 0xffffffff eventType = 0 event = 0 result = 0
2011-05-17 20:25:20.624 BLUConnect[2120:307] BTM: _btServiceEventCallback: service = 0x800 eventType = 0 event = 1 result = 0

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

追我者格杀勿论 2024-11-15 06:17:38

我认为这是在苹果的库中,似乎没有直接的方法可以关闭它 - 我会提交一个“错误”票......

我很确定,不可能重载/覆盖 NSLog 方法为了避免这些日志。

请问是否有特殊需要关闭此功能?

您好,
马蒂亚斯

I think this is within Apple's lib, it seems that there is no direct way of switching it off - I would submit a "bug" ticket ...

I'm pretty sure, that it is not possible to overload/overwrite the NSLog method in order to avoid those logs.

May I ask whether there is a specific need for switching this off?

Greetings,
matthias

酒浓于脸红 2024-11-15 06:17:38

这是不可能的。日志会自动按照苹果提供的创建和使用 GKSession 的方法执行。除了减少控制台中的混乱之外,我看不出有任何需要关闭它们的合理理由。

干杯,
西德

This is impossible. The logs happen automatically do to the methods apple give you to create and use GKSessions. I can't see any legitimate reason for NEEDING to switch them off other than to reduce clutter in your console.

Cheers,
Sidd

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文