May 4, 2020
Estimated Post Reading Time ~

AEM Chrome Plug-in - Log Tracer

Quick Links
AEM Chrome Plug-in Download
Sling Log Tracer 1.0.2+ Bundle Download

Requirements
  1. Requires AEM 6.0+
  2. Requires Apache Sling Log Tracer v1.0.2+ to be installed and enabled on the target AEM instance
  3. This is is a development tool and should not be used on production instances.
  4. ACS AEM Tools is not required
Purpose
AEM Chrome Plug-in - Log Tracer is a Chrome browser extension that exposes server-side log information per-request in the browser.
AEM Chrome Plug-in - Log Tracer collects and exposes per-request:
  1. AEM Logs (based on configurable package definitions)
  2. Request Progress
  3. Queries executed
How to use AEM Chrome Plug-in - Log Tracer
  1. Download and install Sling Log Tracer 1.0.2+ via AEM 6.0+ Felix Console and ensure it is started/active.
  2. Enable Sling Log Tracer via Felix ConfigMgr.
  • Make sure both “Enabled” and “Servlet Enabled” is checked.

3. Install the AEM Chrome Plug-in via the Chrome web store.
4. Open up Chrome Dev Panels (Chrome > View > Developer > Dev Tools) and click on the AEM tab.
  • Pro tip: You can drag to re-arrange Dev Tool tabs.

5. Assuming you setup Sling Log tracer properly and the default AEM settings are used (http://localhost:4502 and admin/admin), the AEM Chrome Plug-in panel will display.

6. If something is misconfigured you will be instructed to open the AEM Chrome Plug-in Options which will guide you to correcting the problem.

7. Open the AEM Chrome Plug-in Options as instructed (Chrome > Window > Extensions > AEM Chrome Plug-in > Options)

8. After AEM Chrome Plug-in Options does not report any issues, close and re-open Chrome dev tools (Step 4)
9. Use the AEM Chrome Plug-in!


10. Pro tip: Use the inline “Mini-options” to quickly tune what data you’re collecting based on what you’re working on.

11. Pro tip: You can download logs to your local machine so you can open then in your favorite log viewer

How AEM Chrome Plug-in - Log Tracer Works
AEM Chrome Plug-in works in conjunction with Apache Sling Log Tracer to collect and expose server-side data to the browser.
  1. AEM Chrome Plug-in intercepts requests made from Chrome browser to AEM 6.0+
  2. AEM Chrome Plug-in injects Sling Log Tracer headers defining what data Sling Log Tracer should collect for that request on the AEM server.
  3. When the HTTP Request returns, a Sling Log Tracer UUID is provided in the HTTP Response. AEM Chrome Plug-in uses this UUID in a background HTTP Request to AEM to retrieve the log data collected by Sling Log Tracer.
  4. AEM Chrome Plug-in parses and injects the log data into the AEM Chrome Plug-in Dev Panel.


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.