Bug 1210446

Summary: [RFE] webapp client logs should be accessible and tuneable in production builds
Product: [oVirt] ovirt-engine Reporter: Greg Sheremeta <gshereme>
Component: Frontend.WebAdminAssignee: Nobody <nobody>
Status: CLOSED WONTFIX QA Contact: Pavel Stehlik <pstehlik>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.5.0CC: bugs, gklein, gshereme, lsurette, mkalinin, rbalakri, Rhev-m-bugs, srevivo, vszocs, ykaul
Target Milestone: ---Keywords: FutureFeature
Target Release: ---Flags: ylavi: ovirt-future?
rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-30 22:51:48 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: 1049409    
Bug Blocks:    
Attachments:
Description Flags
client side logs none

Description Greg Sheremeta 2015-04-09 18:27:04 UTC
Created attachment 1012768 [details]
client side logs

Description of problem:
webadmin and userportal client logs should be accessible in production builds. For debugging UI purposes, we should be able to tune the client log level via a runtime configurable parameter.

For example, if we want to debug some grid refresh issues in a production deployment, we need to set the client log level to DEBUG.

Version-Release number of selected component (if applicable):
master

See attached screenshot for example of logs that should be available in production.

Comment 1 Einav Cohen 2015-04-10 13:10:18 UTC
we may want to incorporate this data in the log-viewer (next to the engine.log, etc.) - not sure.

Comment 2 Yaniv Lavi 2015-04-28 07:42:30 UTC
Pushing to future, pending design of new log viewer.

Comment 3 Vojtech Szocs 2015-05-19 11:55:11 UTC
> webadmin and userportal client logs should be accessible in production
> builds.

Client-side logging code is retained in production builds.

RFE https://bugzilla.redhat.com/1049409 adds the ability to persist client-side log records in browser via HTML5 Web Storage API, effectively keeping these logs between browser restarts.

> For debugging UI purposes, we should be able to tune the client log
> level via a runtime configurable parameter.

Once above mentioned RFE is done, we can tune the client-side log level at build time ("gwt.runtimeLogLevel" Maven property) as well as runtime (e.g. using HTML <meta> tag or programmatically by calling "rootLogger.setLevel").

Because of that, this BZ depends on above mentioned RFE.

> For example, if we want to debug some grid refresh issues in a production
> deployment, we need to set the client log level to DEBUG.

There's a caveat to keep in mind: in order to see DEBUG logs at runtime, we must compile GWT application with logging level set to DEBUG. Otherwise, GWT compiler prunes the DEBUG log statements and we won't see any DEBUG logs at runtime.

Building on top of above mentioned RFE, "gwt.runtimeLogLevel" could be set to DEBUG (compile-time) and narrowed down to INFO (runtime) by default. We could add new Engine config option to tune *runtime* GWT logging level.

Comment 4 Vojtech Szocs 2015-05-19 11:58:00 UTC
> Because of that, this BZ depends on above mentioned RFE.

Added BZ dependency.

Comment 5 Vojtech Szocs 2015-11-26 15:01:31 UTC
(In reply to vszocs from comment #3)
> Building on top of above mentioned RFE, "gwt.runtimeLogLevel" could be set
> to DEBUG (compile-time) and narrowed down to INFO (runtime) by default. We
> could add new Engine config option to tune *runtime* GWT logging level.

To clarify, setting "gwt.runtimeLogLevel" to DEBUG should only be done for production builds -- retain all logs and filter them at runtime as needed. There would be no configuration change needed for development builds.

Comment 6 Marina Kalinin 2016-06-30 17:44:27 UTC
Greg, how does this RFE relate to this bug1351349 ?
Wouldn't it be closed, if we have the bug fixed and having the debug packages available on demand?

Comment 7 Greg Sheremeta 2016-06-30 19:35:33 UTC
You're referring to the ability to install rhevm-webadmin-portal-debuginfo and rhevm-user-portal-debuginfo packages and get de-obfuscated logs in ui.log.

That does achieve what we're looking for in this RFE -- deobfuscated UI logs -- so perhaps this could be closed. My original thought was to have those logs come back through to the client somehow, so the user doesn't have to go digging on the engine.

Comment 8 Marina Kalinin 2016-06-30 21:32:14 UTC
Greg, we can keep it open - does not hurt anyone.
And once you or anyone gets the time to implement it - why not?