JJianliang Wang[Feature][Logging] Observe actions through recording macros
| Files | Last commit | Last update |
|---|---|---|
initial commit | 1 year ago | |
[Feature] Define Lynx entity log context protocol - Add the canonical View, Engine, and Runtime identity tuple with exact native and platform serialization. - Add a process-wide monotonic native entity ID generator with exhaustion and concurrency guarantees. - Cover tuple formatting, snapshot behavior, ordinary logger behavior, and ID allocation without changing lifecycle ownership. TEST: Native LogContext and entity ID generator unit tests; Android LynxLogContext instrumentation tests; iOS production and unit-test Objective-C++ syntax compilation; Harmony production and ohosTest ArkTS compilation; API metadata regeneration; focused repository linters; git diff --check AutoSubmit: True | 2 months ago | |
[Feature] LynxBase standalone -- Integrate all modules with the standalone LynxBase library Refactors the codebase to make LynxBase a fully independent component, meeting the dependency requirements for all modules. This commit completes the integration of all modules with the `LynxBase` library. Key Changes: 1. Refactor Lynx Log: a. Removed `LLog` implementations (`.java`, `.ets`, `.mm`) from the `lynx` module, forwarding all public APIs to the `LynxBase` library. b. On Android, replaced unused `ILogDelegate` and `ILynxLogService` with `BaseLogDelegate` to bridge the host-injected `AbsLogDelegate`. c. Adapted `LynxLogService` on Android, Darwin, and HarmonyOS to inherit from the `ILynxBaseLogService` interface and be injected via `LynxBaseService`. d. Replaced `logging_android.cc` and `logging_darwin.cc` in the `lynx` module with the implementations from `LynxBase`. 2. Implement Base Trace: a. On Darwin and HarmonyOS, implemented and injected `LynxBaseTraceService` during `LynxEnv` initialization, allowing `LynxBase` to retrieve the trace backend from the service. b. Replaced the `TRACE_EVENT` macro with the internal `BASE_TRACE_EVENT` macro within the `LynxBase` library. 3. Adapt Build System: a. Removed dependencies on the `base` submodule from GN projects. b. On Android, configured all modules to dynamically link the `lynx_base` library and depend on the `LynxBase` component at the platform level. c. On iOS, updated all Podspec targets (e.g., `Lynx`, `LynxDevtool`) to depend on the `LynxBase` podspec instead of `base` source files. d. On HarmonyOS, switched all modules from statically linking `base` source to dynamically linking the `lynx_base` library and depending on its HAR package. e. On Windows, established a static dependency on the `base` static library. f. Configured unit test modules to statically depend on the `base_static` library. 4. Update LynxEnv Initialization: a. Removed legacy `LLog` initialization logic. b. Added injection logic for the `LynxBase` Trace service on Darwin and HarmonyOS. c. Added calls to initialize `LynxBaseEnv` on all platforms. 5. Android Specific: Removed calls to `fml::MessageLoopAndroid::Register(env)` from outside the `LynxBase` library. 6. Symbol Management: Exported necessary symbols from `LynxBase` to support dynamic linking across all components. issue:m-6736726571 SkipChecks:macro AutoSubmit:true | 1 year ago | |
[Feature][Logging] Observe actions through recording macros Centralize observation logs in RECORD and pass LogContext after the action at every entry point. Keep the original arguments and record ID for the optional Recorder, evaluating shared arguments only once. Propagate runtime context to scripts and native module callbacks. Observation remains available without Recorder and follows the existing OBSERVE threshold. Log action metadata without serializing or writing payloads. Cover lazy arguments, optional conditions and enclosing-function returns. TEST: Recorder-enabled and recorder-disabled syntax checks pass for core and desktop call sites and macro tests. All 75 record_unittest_exec tests pass. AutoSubmit: True SkipChecks: macro | 1 month ago | |
[Feature] LynxBase standalone -- Migrate Lynx Log implementation to the Lynx Base library This change centralizes the logging mechanism by migrating platform-specific log implementations into the LynxBase library. 1. Android: a. Migrated LLog.java to LynxBase and renamed it to LynxLog.java. b. Migrated logging_android.h and logging_android.cc to the LynxBase library. c. Added the AbsBaseLogDelegate class to serve as the platform log proxy. d. Handles log initialization within LynxBaseEnv. 2. Darwin: a. Migrated LynxLog.h and LynxLog.mm to the LynxBase component. b. Migrated logging_darwin.h and logging_darwin.mm to the LynxBase library. c. Handles log initialization within LynxBaseEnv. 3. HarmonyOS: a. Migrated LLog.ets to LynxBase and renamed it to LynxLog.ets. b. Migrated logging_harmony.h and logging_harmony.mm to the LynxBase library. c. Handles log initialization within LynxBaseEnv. 4. Windows: a. Migrated lynx_log.h and lynx_log.cc to the LynxBase library and rename logging_headless.h and logging_headless.cc. b. Handles log initialization within LynxBaseEnv. issue:m-6736726571 SkipChecks:macro AutoSubmit:true | 1 year ago | |
[Feature] LynxBase standalone -- Integrate all modules with the standalone LynxBase library Refactors the codebase to make LynxBase a fully independent component, meeting the dependency requirements for all modules. This commit completes the integration of all modules with the `LynxBase` library. Key Changes: 1. Refactor Lynx Log: a. Removed `LLog` implementations (`.java`, `.ets`, `.mm`) from the `lynx` module, forwarding all public APIs to the `LynxBase` library. b. On Android, replaced unused `ILogDelegate` and `ILynxLogService` with `BaseLogDelegate` to bridge the host-injected `AbsLogDelegate`. c. Adapted `LynxLogService` on Android, Darwin, and HarmonyOS to inherit from the `ILynxBaseLogService` interface and be injected via `LynxBaseService`. d. Replaced `logging_android.cc` and `logging_darwin.cc` in the `lynx` module with the implementations from `LynxBase`. 2. Implement Base Trace: a. On Darwin and HarmonyOS, implemented and injected `LynxBaseTraceService` during `LynxEnv` initialization, allowing `LynxBase` to retrieve the trace backend from the service. b. Replaced the `TRACE_EVENT` macro with the internal `BASE_TRACE_EVENT` macro within the `LynxBase` library. 3. Adapt Build System: a. Removed dependencies on the `base` submodule from GN projects. b. On Android, configured all modules to dynamically link the `lynx_base` library and depend on the `LynxBase` component at the platform level. c. On iOS, updated all Podspec targets (e.g., `Lynx`, `LynxDevtool`) to depend on the `LynxBase` podspec instead of `base` source files. d. On HarmonyOS, switched all modules from statically linking `base` source to dynamically linking the `lynx_base` library and depending on its HAR package. e. On Windows, established a static dependency on the `base` static library. f. Configured unit test modules to statically depend on the `base_static` library. 4. Update LynxEnv Initialization: a. Removed legacy `LLog` initialization logic. b. Added injection logic for the `LynxBase` Trace service on Darwin and HarmonyOS. c. Added calls to initialize `LynxBaseEnv` on all platforms. 5. Android Specific: Removed calls to `fml::MessageLoopAndroid::Register(env)` from outside the `LynxBase` library. 6. Symbol Management: Exported necessary symbols from `LynxBase` to support dynamic linking across all components. issue:m-6736726571 SkipChecks:macro AutoSubmit:true | 1 year ago |