NativeScript / NativeScript/android

Improve logging routine in runtime engine

未关闭
#641 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

feature
主要语言
C++
星标
563
派生
144
平均合并
10 小时 46 分钟
30 天内合并 PR
14

描述

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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先定位 runtime engine 现有的 logging 和 instrumentation 代码,然后检查 package.json 对 android.diagnosticTracing 和 android.diagnosticBenchmarking 的处理。将链接的 .NET Tracing 模型作为上下文。完成的标准是:通过这些设置即可使用分类且可配置的 tracing 和可解析的 benchmarking logs,并且已记录性能开销。

由索引模型根据 Issue 内容生成。

评估

技术栈
android, cpp
领域
mobile-dev, observability, performance
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。