Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » How to enable Eclipse tracing in EGit Tests
How to enable Eclipse tracing in EGit Tests [message #1771886] Thu, 31 August 2017 15:53 Go to next message
Yusuke SATO is currently offline Yusuke SATOFriend
Messages: 6
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?
Re: How to enable Eclipse tracing in EGit Tests [message #1772011 is a reply to message #1771886] Sun, 03 September 2017 20:23 Go to previous messageGo to next message
Thomas Wolf is currently offline Thomas WolfFriend
Messages: 80
Registered: August 2016
Member
I think you also have to enable org.eclipse.egit.core/debug.
Re: How to enable Eclipse tracing in EGit Tests [message #1772290 is a reply to message #1772011] Thu, 07 September 2017 15:34 Go to previous message
Yusuke SATO is currently offline Yusuke SATOFriend
Messages: 6
Registered: June 2017
Junior Member
Thank you for your advice.
I have made a Run Configuration for org.eclipse.egit.core--All-Tests.launch, and enabled org.eclipse.egit.core/debug and org.eclipse.egit.core/debug/core/optrace on [Run Configurations]-[Tracing], and got traces on /egit-master/junit-workspace/.metadata/trace.log.
Previous Topic:Indicator that upstream branch has updated?
Next Topic:"Invalid remote: origin" error when pulling latest version
Goto Forum:
  


Current Time: Sat Sep 22 09:13:59 GMT 2018

Powered by FUDForum. Page generated in 0.02245 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top