NativeScript / NativeScript/android

Improve logging routine in runtime engine

Open
#641 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
C++
Stars
563
Forks
144
Avg merge
10h 46m
Merged PRs (30d)
14

Description

Debug log messages need to be improved by providing additional information, such as TID, Category, and provide a better verbosity overall. This will allow us to spot bugs more easily when reported by users, as well as to pinpoint potential bottlenecks in the engine.

The improved logging should provide more granular control of the logs, or just categorization of the different execution paths in the runtime. It can be modeled after the Tracing routine in .NET -> https://msdn.microsoft.com/en-us/library/sk36c28t(v=vs.110).aspx

Trace (Log) statements throughout the runtime code (Instrumentation of the code) are categorized with a relevant preset category. If a listener is attached for that category, messages will be output as per the Listener's implementation. - Default LogCat implementation should be available for all categories.

Can be enabled by setting the "android": { "diagnosticTracing": true } in the project's package.json

Micro benchmarking can also be enabled to record time spent in execution of most key methods (that are measurable, can be measured with little to no error added by resolution timing - time spent to record start and end time). The benchmarking routine should output logs in a parsable manner for easier visualization.

Can be enabled by setting the "android": { "diagnosticBenchmarking": true } in the project's package.json

Enabling tracing could and probably WILL impose a performance penalty

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 locating the runtime engine's existing logging and instrumentation code, then inspect package.json handling for android.diagnosticTracing and android.diagnosticBenchmarking. Use the linked .NET Tracing model as context. Done means categorized, configurable tracing and parsable benchmarking logs are available through those settings, with the performance penalty documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, cpp
Domain
mobile-dev, observability, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.