NativeScript / NativeScript/nativescript-cli

[FR] setting loglevel through nsconfig

Open
#4,603 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

device logs feature os: ios
Dominant language
JavaScript
Stars
1.1k
Forks
204
Avg merge
1d 9h
Merged PRs (30d)
8

Description

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?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how nsconfig values are read by the iOS run command and how the existing loglevel setting is applied. Verify whether configuration can suppress the noisy device logs without hiding JavaScript logs, then confirm the behavior on a device and simulator.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, javascript
Domain
cli, mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.