| Summary: | Ability to log requests sent to the JIRA server | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Mark Kralj-Taylor <kralj.mark> |
| Component: | Mylyn | Assignee: | Mark Kralj-Taylor <kralj.mark> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P4 | CC: | robert.elves, steffen.pingel |
| Version: | unspecified | Keywords: | helpwanted |
| Target Milestone: | 3.1 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
| Attachments: | |||
|
Description
Mark Kralj-Taylor
Web calls are performed through get or post requests by calling WebUtil.execute(). The library used is Apache HttpClient which can be configured to log all requests. The WebClientLog class has some sample code how to do this. One difficulty is that with Mylyn 3.0 HttpClient is shared with other Eclipse plug-ins so logging would pick up requests from other plug-ins as well. All SOAP calls are send using Apache Axis which I believe allows logging of requests as well: http://ws.apache.org/axis/java/developers-guide.html#Logging/Tracing. The Axis plug-in is shared as well. Created attachment 109874 [details]
Patch to WebUtil to not overwrite JCL System properties set with -D on Java command line.
Currently WebUtil sets JDL system properties without checking if a value has already been set explicitly. This means you have to edit Mylyn code to change JCL logging.
The patch lets you control JCL logging with -D settings on the Java command line that launched Eclipse.
For example adding this to your Eclipse Java launch command line enables verbose Mylyn wire logging:
-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
-Dorg.apache.commons.logging.simplelog.showlogname=true
-Dorg.apache.commons.logging.simplelog.defaultlog=off
-Dorg.apache.commons.logging.simplelog.log.httpclient.wire=debug
-Dorg.apache.commons.logging.simplelog.log.org.apache.commons.httpclient=off
-Dorg.apache.commons.logging.simplelog.log.org.apache.axis.message=debug
Created attachment 109875 [details]
Patch to WebUtil to not overwrite JCL System properties set with -D on Java command line.
Currently WebUtil sets JDL system properties without checking if a value has already been set explicitly. This means you have to edit Mylyn code to change JCL logging.
The patch lets you control JCL logging with -D settings on the Java command line that launched Eclipse.
For example adding this to your Eclipse Java launch command line enables verbose Mylyn wire logging:
-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
-Dorg.apache.commons.logging.simplelog.showlogname=true
-Dorg.apache.commons.logging.simplelog.defaultlog=off
-Dorg.apache.commons.logging.simplelog.log.httpclient.wire=debug
-Dorg.apache.commons.logging.simplelog.log.org.apache.commons.httpclient=off
-Dorg.apache.commons.logging.simplelog.log.org.apache.axis.message=debug
Sorry timeout lead to duplicate submit of comment and patch. Thanks for pointing that out Mark. Rob, we could add detection code that would leave the settings untouched in case the system property has been set? Patch applied, ip log updated. |