NativeScript / NativeScript/nativescript-cli

[FR] setting loglevel through nsconfig

未關閉
#4,603 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

device logs feature os: ios
主要語言
JavaScript
星號
1.1k
分支
204
平均合併
1 天 9 小時
30 天內合併 PR
8

描述

I have an issue with the ios run and logging level.
When i run it on my device (need to check on the simulator but i think it is the same) i see a lot of "polluting" logs which makes it almost impossible to see the JS logs:

ay  9 10:21:55 IPhone-Martin Mini2SmartApp(CoreFoundation)[297] <Debug>: Bundle: <private>, key: start_pairing, value: start_pairing, table: Localizable, localizationName: (null), result: start pairing
May  9 10:21:55 IPhone-Martin Mini2SmartApp(CoreFoundation)[297] <Debug>: Bundle: <private>, key: __, value: , table: Localizable, localizationName: (null), result: __
May  9 10:21:55 IPhone-Martin Mini2SmartApp(CoreBluetooth)[297] <Debug>: Sending XPC message <private>: <private>
May  9 10:21:56 IPhone-Martin Mini2SmartApp(CoreBluetooth)[297] <Debug>: Sending XPC message <private>: <private>
May  9 10:21:56 IPhone-Martin Mini2SmartApp(CoreBluetooth)[297] <Debug>: Sending XPC message <private>: <private>
May  9 10:22:11 IPhone-Martin Mini2SmartApp(libsystem_network.dylib)[302] <Info>: nw_endpoint_flow_protocol_connected [3.1 35.231.145.151:443 in_progress socket-flow (satisfied)] Output protocol connected
May  9 10:22:11 IPhone-Martin Mini2SmartApp(libsystem_network.dylib)[302] <Debug>: nw_endpoint_flow_connected_path_change [3.1 35.231.145.151:443 ready socket-flow (satisfied)]
May  9 10:22:11 IPhone-Martin Mini2SmartApp(libsystem_network.dylib)[302] <Info>: nw_endpoint_flow_connected_path_change [3.1 35.231.145.151:443 ready socket-flow (satisfied)] Connected path is satisfied
May  9 10:22:11 IPhone-Martin Mini2SmartApp(libsystem_network.dylib)[302] <Debug>: nw_endpoint_resolver_receive_report [3 gitlab.com:443 in_progress resolver (satisfied)] received child report:[3.1 35.231.145.151:443 ready socket-flow (satisfied)]
May  9 10:22:11 IPhone-Martin Mini2SmartApp(libsystem_network.dylib)[302] <Info>: nw_connection_endpoint_report [3.1 35.231.145.151:443 ready socket-flow (satisfied)] reported event flow:finish_connect
May  9 10:22:11 IPhone-Martin Mini2SmartApp(libsystem_network.dylib)[302] <Info>: nw_connection_endpoint_report [3 gitlab.com:443 ready resolver (satisfied)] reported event flow:finish_connect
May  9 10:22:11 IPhone-Martin Mini2SmartApp(libsystem_network.dylib)[302] <Debug>: __tcp_connection_start_block_invoke 3 sending event TCP_CONNECTION_EVENT_TLS_HANDSHAKE_COMPLETE in response to state ready and error (null)
May  9 10:22:11 IPhone-Martin Mini2SmartApp(libsystem_network.dylib)[302] <Debug>: tcp_connection_event_notify 3 event: TCP_CONNECTION_EVENT_TLS_HANDSHAKE_COMPLETE, reason: nw_connection event, should deliver: true
TIC TCP Conn Event [3:0x17418a690]: 8 Err(0)

I think i actually see all the device logs.
Could we have a way to set the loglevel through nsconfig? Would it filter those?

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

首先追蹤 iOS run command 如何讀取 nsconfig 值,以及現有的 loglevel 設定如何套用。確認設定是否能在不隱藏 JavaScript 日誌的情況下抑制嘈雜的裝置日誌,然後在裝置和模擬器上確認其行為。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
ios, javascript
領域
cli, mobile
Issue 類型
功能
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。