Piotr Kliczewski has submitted this change and it was merged.
Change subject: webadmin,userportal: Improve the way logging works
......................................................................
webadmin,userportal: Improve the way logging works
1. all logging related code extracted into ApplicationLogManager
2. added "error is effectively the same as last one" detection:
* on 1st occurence, error is logged as "Uncaught exception"
* on 2nd occurence, error is logged as "Uncaught exception (2x)"
* same message for any further occurences of the same error
3. error is remotely logged ONLY if both of following are true:
* application (browser) window has focus
* current error is NOT effectively the same as last one
An error E1 is effectively the same as error E2 if and only if
E1's stack trace has the same length as E2's stack trace and the
stack trace elements are equal at any given index.
Due to how GWT emulates java.lang.StackTraceElement, we're using
StackTraceElement.toString() to capture all important info:
declaringClass
methodName
fileName
lineNumber
Change-Id: I66c3c5c4ca2451403d1cdd8d29cca4823a90f4f2
Bug-Url:
https://bugzilla.redhat.com/1358136
Signed-off-by: Vojtech Szocs <vszocs(a)redhat.com>
---
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/ApplicationLogManager.java
M
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/system/ApplicationFocusManager.java
M
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/system/BaseApplicationInit.java
M
frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/system/ApplicationInit.java
M
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/system/ApplicationInit.java
6 files changed, 149 insertions(+), 54 deletions(-)
Approvals:
Alexander Wels: Looks good to me, approved
Jenkins CI: Passed CI tests
Vojtech Szocs: Verified
--
To view, visit
https://gerrit.ovirt.org/61414
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I66c3c5c4ca2451403d1cdd8d29cca4823a90f4f2
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-4.0.2
Gerrit-Owner: Vojtech Szocs <vszocs(a)redhat.com>
Gerrit-Reviewer: Alexander Wels <awels(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Oved Ourfali <oourfali(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>