NativeScript / NativeScript/android

Improve logging routine in runtime engine

Offen
#641 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

feature
Vorherrschende Sprache
C++
Sterne
563
Forks
144
Ø Merge
10 Std. 46 Min.
Gemergte PRs (30 T.)
14

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, den vorhandenen Logging- und Instrumentierungscode der Runtime-Engine zu lokalisieren, und untersuche anschließend die Behandlung von package.json für android.diagnosticTracing und android.diagnosticBenchmarking. Verwende das verlinkte .NET Tracing-Modell als Kontext. Als abgeschlossen gilt die Arbeit, wenn kategorisiertes, konfigurierbares Tracing und analysierbare Benchmarking-Logs über diese Einstellungen verfügbar sind und der Performance-Verlust dokumentiert ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
android, cpp
Bereich
mobile-dev, observability, performance
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.