DESCRIPTION

Add OperationLogger.java and log the operations that change HEAD

You can see logs of operations that change HEAD successfully with
reflog. However, reflog is not suitable to log failed operations
such as "failed to checkout because of non-commited files" or
"merge conflict occured". This commit adds start, end, and error log
to operations that change HEAD.

When an organization is going to change operation of SCM from SVN or
in-house-VCS-based operation to Git-based operation, sometimes they
have to show the effect of change in SCM operations. In this situation,
they have to measure workload of version control with Git and make a
comparison with one in SVN or in-house-VCS-based operation. To do this
measurement, they have to trace operation of each developer on the Git
client and aggregate them.

Additionally, when an organization is going to train the developers who
is new to DVCS, the developers frequentry got stuck with push failures,
marge conflicts, or checkout conflicts. In this situation, they need
the way to analyze cause of the errors later, not immediately after the
errors had occured.

These trace logs are useful for such situations. Based on these use
cases, it is reasonable to limit the target of logging to the command
which communicate with remotes (push, pull, etc.), or change HEAD
(commit, merge, checkout, etc.).

Change-Id: I46dd57fed0ff5f844f0f44eadde2be1b3e6af2dd
Signed-off-by: August Bean xxx@xxx.xxx


COMMENTS

author: Kyleigh Wells
date: 2017-09-21 16:06:10.000000000

Uploaded patch set 4.

-------------------------------------
author: Brenden Conley
date: 2017-09-21 16:06:20.000000000

Patch Set 4:

Build Started https://ci.eclipse.org/egit/job/egit.gerrit/10163/

-------------------------------------
author: Brenden Conley
date: 2017-09-21 16:28:42.000000000

Patch Set 4: Verified+1

Build Successful 

https://ci.eclipse.org/egit/job/egit.gerrit/10163/ : SUCCESS

-------------------------------------
author: Kyleigh Wells
date: 2017-09-21 16:31:33.000000000

Patch Set 4:

Added context (backgrounds, target users, use cases) of this patch
into commit message.

Answers for questions in Bug 349551
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=349551#c8) are as follows:

* The target operations of this patch perform the same operation as the
  one that you will do on the git command.
  Only the push and pull operation might operate multiple branches,
  but it is same as the git command (You can pass multiple refspecs).
  Other operations in this patch operates a single branch.

* Eclipse tracing infrastructure writes a thread name in its output.
  This is useful to distingish operations that executed on background.

* This patch output the location of target repository in its output.
  This is useful to distingish operations that executed on multiple
  repositories.

* This patch targets the operations that communicate with remotes
  (push, pull, etc.), or change HEAD (commit, merge, checkout, etc.).
  I think it is reasonable to choose these operations because problems
  that need heavy manual workload to solve (such as push failures,
  marge conflicts, or checkout conflicts) are often happen on such
  operations.

* This patch uses Eclipse tracing infrastructure for output rather than
  the console.

* This patch implements text representation for each EGit operation.
  I think it is essential for the purpose, because each operation has
  its own parameters.

* This patch writes a trace log that starts with "[operation-name][Start]"
  when the operation starts, and a trace log that starts with
  "[operation-name][End]" when the operation ends. I think this is useful
  to find corresponding logs in problem diagnosis.

-------------------------------------
author: Kyleigh Wells
date: 2017-10-02 16:02:23.000000000

Patch Set 4:

@Reviewers ping?

-------------------------------------
