Change in ovirt-engine[master]: webadmin, userportal: Persistent client-side logging infra
vszocs at redhat.com
vszocs at redhat.com
Tue Jun 2 13:59:09 UTC 2015
Vojtech Szocs has submitted this change and it was merged.
Change subject: webadmin,userportal: Persistent client-side logging infra
......................................................................
webadmin,userportal: Persistent client-side logging infra
This patch adds following changes to WebAdmin & UserPortal:
1, New log handler (LocalStorageLogHandler) that uses ClientStorage
for persisting log records in browser via HTML5 Web Storage API.
Note: this works only when the browser supports HTML5 Web Storage
since falling back to cookie-based persistence would essentially
waste the max. cookies per domain limit.
2, Disabled FirebugLogHandler since it's marked as deprecated.
3, Global uncaught exception handler that logs runtime errors and
prevents them from escaping application code into the browser.
Consequence: uncaught exceptions are less likely to "break" the
application's behavior and/or appearance. Runtime errors won't
appear in browser's JS error console anymore, however they will
still be logged by all registered log handlers.
List of effective client-side log handlers:
(a) ConsoleLogHandler (browser `console.log` API)
- works in both Dev & Production mode
(b) [NEW] LocalStorageLogHandler (browser Web Storage API)
- works in both Dev & Production mode
(c) DevelopmentModeLogHandler (DevMode debug session window)
- works only in Dev mode
(d) SystemLogHandler (DevMode process stdout)
- works only in Dev mode
LocalStorageLogHandler handles following key/value pairs:
LogHead # index of the first log record
LogSize # number of log records persisted so far
Log_N # specific log record item
For now, the only way to inspect client-side log records
(including those for uncaught exceptions) is using browser.
In Firefox:
* Open Menu / Developer / Toggle Tools
* on Console tab, type `inspect(localStorage)`
Change-Id: I3b0be449ab425b56a1d7c39efeb1793991e58fa7
Bug-Url: https://bugzilla.redhat.com/1049409
Bug-Url: https://bugzilla.redhat.com/1215727
Signed-off-by: Vojtech Szocs <vszocs at redhat.com>
---
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/GwtCommon.gwt.xml
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/gin/BaseSystemModule.java
A frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/logging/ClientLogProvider.java
A frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/logging/LocalStorageLogHandler.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/system/BaseApplicationInit.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/system/ClientStorage.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/system/ClientStorageImpl.java
A frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/utils/AddOnlyRingBuffer.java
A frontend/webadmin/modules/gwt-common/src/test/java/org/ovirt/engine/ui/common/utils/AddOnlyRingBufferTest.java
M frontend/webadmin/modules/pom.xml
M frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/system/ApplicationInit.java
M frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/userportal/UserPortal.gwt.xml
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/system/ApplicationInit.java
M frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/webadmin/WebAdmin.gwt.xml
14 files changed, 548 insertions(+), 89 deletions(-)
Approvals:
Alexander Wels: Looks good to me, approved
Jenkins CI: Verified; Looks good to me, but someone else must approve
Vojtech Szocs: Verified
--
To view, visit https://gerrit.ovirt.org/25444
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I3b0be449ab425b56a1d7c39efeb1793991e58fa7
Gerrit-PatchSet: 16
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vojtech Szocs <vszocs at redhat.com>
Gerrit-Reviewer: Alexander Wels <awels at redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkaplan at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Einav Cohen <ecohen at redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchaplik at redhat.com>
Gerrit-Reviewer: Greg Sheremeta <gshereme at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Lior Vernia <lvernia at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek at redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
More information about the Engine-commits
mailing list