Add copious debug logging to MergeOp

Sometimes merge attempts fail with no user-visible message. Sometimes
there is an error in the logs, but sometimes it is never logged, or
the error does not provide enough context. Add lots of debug logging
to help administrators and Gerrit developers track down bugs.

It is possible that eventually some of these informational conditions
will make it into end-user-visible messages, but for now just log
until we get a better sense of what are common failures and how we
might communicate them.

Include in each log message an identifier for the current operation,
which includes a project, branch, and timestamp. This is because
multiple merge runs can run simultaneously in the work queue, and the
logger instance is (and probably should remain) static.

Limit somewhat the available method signatures in the newly added
helper methods, to avoid the terrible ambiguity between
Logger#error(String, Throwable) and Logger#error(String, Object...).

Change-Id: I872451a901500376160323152a81cfced04505d4
1 file changed