How to enable Eclipse tracing in EGit Tests [message #1771886] |
Thu, 31 August 2017 15:53 |
Yusuke SATO Messages: 11 Registered: June 2017 |
Junior Member |
|
|
Now I am tring to change logging implementation of https://git.eclipse.org/r/103342 with Eclipse tracing mechanism.
I added an option for .options file in org.eclipse.egit.core project like this:
--------
# Trace location for the trace operations
org.eclipse.egit.core/debug/core/optrace = false
--------
I also added an Enum value to GitTraceLocation.java like this:
--------
/** Core */
CORE("/debug/core"), //$NON-NLS-1$
/** IndexDiffCache */
INDEXDIFFCACHE("/debug/core/indexdiffcache"), //$NON-NLS-1$
/** OperationTrace */
OPTRACE("/debug/core/optrace"); //$NON-NLS-1$
--------
I changed logging implementation like this:
--------
if (GitTraceLocation.OPTRACE.isActive()) {
GitTraceLocation.getTrace().trace(
GitTraceLocation.OPTRACE.getLocation(),
NLS.bind(startMessage, parameter));
}
--------
I created a run configuration from org.eclipse.egit.ui project, and add -debug option Program arguments and checked "/debug/core/optrace" in Enable tracing tab.
And I launched Eclipse from that run configuration, and checked [General]-[Tracing]-[Enable tracing] in Preferences, and set [Git]-[org.eclipse.egit.ui/debug/optrace] to true.
But, when I manipulate the Git repository in the launched Eclipse instance, GitTraceLocation#initializeFromOptions() never called, and /egit-master/ws/.metadata/trace.log file did not created.
How can I enable Eclipse tracing mechanism in an Eclipse instance launched from org.eclipse.egit.ui project?
And How can I enable Eclipse tracing mechanism when I launch EGit Tests from org.eclipse.egit.core--All-Tests.launch file?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02837 seconds