Bug 1049409
Summary: | [RFE] Persistent client-side logging infrastructure | ||
---|---|---|---|
Product: | [oVirt] ovirt-engine | Reporter: | Vojtech Szocs <vszocs> |
Component: | RFEs | Assignee: | Vojtech Szocs <vszocs> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Pavel Novotny <pnovotny> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | --- | CC: | bugs, gklein, iheim, mgoldboi, pstehlik, rbalakri, yeylon, ykaul |
Target Milestone: | ovirt-3.6.0-rc | Keywords: | FutureFeature |
Target Release: | 3.6.0 | Flags: | rule-engine:
ovirt-3.6.0+
ylavi: planning_ack+ rule-engine: devel_ack+ pnovotny: testing_ack+ |
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Enhancement | |
Doc Text: |
Added the ability to persist UI log messages in the browser, utilizing HTML5 Local Storage API [1].
[1] https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API
Unless the user manually clears browser's web storage content [2], UI logs are persisted across browser restarts.
[2] http://www.ghacks.net/2015/02/05/how-to-clear-web-storage-in-your-browser-of-choice/
This feature allows better diagnosis of UI related problems.
To inspect UI logs in Firefox:
- navigate to oVirt/RHEV web application
- open developer tools (Ctrl+Shift+I)
- select Console tab
- type `inspect(localStorage)`
To inspect UI logs in Chrome:
- open developer tools (Ctrl+Shift+I)
- select Resources tab
- select Local Storage and pick oVirt/RHEV Engine origin
Log records are stored as a ring buffer [3]: "First In, First Out" (FIFO) data structure with fixed capacity (100). When adding new element into full buffer, the oldest element is replaced with newly added element.
[3] https://en.wikipedia.org/wiki/Circular_buffer
Actual log records are stored under key `ENGINE_{WebAdmin,UserPortal}_Log_{N}` where N is a number ranging from 0 (inclusive) to 100 (exclusive).
Keys `ENGINE_{WebAdmin,UserPortal}_LogHead` and `ENGINE_{WebAdmin,UserPortal}_LogSize` are used to store internal state of the ring buffer.
See Pavel's comment #3 for examples on specific keys and their values.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2016-02-10 12:50:00 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | UX | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1210446 |
Description
Vojtech Szocs
2014-01-07 14:44:03 UTC
Update of BZ description (comment #0): - client-side logging code is retained also in production (non-debug) GWT application builds - patch [1] ensures that client-side log records are persisted in browser via HTML5 Web Storage API - see commit message [1] for list of all effective client-side log handlers [1] https://gerrit.ovirt.org/#/c/25444/ ovirt-3.6.0-3 release Verified in rhevm-3.6.3-0.1.el6.noarch (build 3.6.3-1 RC1). User Portal and Webadmin now store client-side log messages to browser's local storage. The pattern for keys names is following: ENGINE_{UserPortal,WebAdmin}_Log_{$index,LogHead,LogSize} Legend: ENGINE_WebAdmin_Log_$index - a single "log record", $index value is within range (0, ENGINE_WebAdmin_LogSize - 1) ENGINE_WebAdmin_LogSize - number of "log records", maximum is 100, after reaching the limit, messages are rotated/overwritten ENGINE_WebAdmin_LogHead - number of the latest "log record", not index - the latest "log record" key name is equal to ENGINE_WebAdmin_Log_$(ENGINE_WebAdmin_LogHead-1) Excerpt from my browser storage: ENGINE_WebAdmin_LogHead "23" ENGINE_WebAdmin_LogSize "100" ENGINE_WebAdmin_Log_0 "Mon Feb 01 17:13:17 GMT+100 2016 org.ovirt.engine.ui.webadmin.plugin.PluginManager INFO: Invoking event handler function [HostSelectionChange] for plugin [TestPlugin]" ENGINE_WebAdmin_Log_1 "Mon Feb 01 17:13:17 GMT+100 2016 org.ovirt.engine.ui.webadmin.plugin.PluginManager INFO: Invoking event handler function [HostSelectionChange] for plugin [redhat_support_plugin_rhev]" ENGINE_WebAdmin_Log_10 "Tue Feb 02 13:19:23 GMT+100 2016 org.ovirt.engine.ui.webadmin.plugin.PluginManager INFO: Plugin [redhat_support_plugin_rhev] reports in as ready" ENGINE_WebAdmin_Log_11 "Tue Feb 02 13:19:23 GMT+100 2016 org.ovirt.engine.ui.webadmin.plugin.PluginManager INFO: Plugin [TestPlugin] has registered the event handler object" ... ... ENGINE_WebAdmin_Log_21 "Tue Feb 02 13:55:09 GMT+100 2016 org.ovirt.engine.ui.webadmin.plugin.PluginManager INFO: Invoking event handler function [RestApiSessionAcquired] for plugin [TestPlugin]" ENGINE_WebAdmin_Log_22 "Tue Feb 02 13:55:09 GMT+100 2016 org.ovirt.engine.ui.webadmin.plugin.PluginManager INFO: Invoking event handler function [RestApiSessionAcquired] for plugin [redhat_support_plugin_rhev]" ENGINE_WebAdmin_Log_23 "Wed Jan 27 17:54:19 GMT+100 2016 org.ovirt.engine.ui.uicompat.EnumTranslator WARNING: trying to localize null, probable error. Exception is not thrown, returning 'N/A'" ENGINE_WebAdmin_Log_24 "Wed Jan 27 17:54:23 GMT+100 2016 org.ovirt.engine.ui.uicompat.EnumTranslator WARNING: trying to localize null, probable error. Exception is not thrown, returning 'N/A'" |