This week in the neverending saga of logging in git-bundle-server introduces child process tracing (specifically, child_start, child_ready, and child_exit trace2 events)! There's a lot in this PR that's not that, though, so to summarize:
Commits 1 & 2 are minor fixups/style adjustments to the logging format for the time, t_rel, and t_abs fields.
Commits 3-7 refactor CommandExecutor to both use a log.TraceLogger (which it will need in commit 8) and make it flexible enough to replace standalone usage of command.Exec().
Commit 8 adds a method for child process logging to log.TraceLogger & log.Trace2 (the ChildProcess() method)
Commits 9-10 update common.FileSystem to handle the file writing & other usage needed by both cron.gos & git.go
Commits 11-12 refactor both cron.gos and git.go to move their functions into structs, replacing custom file writing & command execution with use of common.FileSystem and cmd.CommandExecutor (the latter of which includes the newly-added Trace2 child process logging).
Part of #22.
Previous PRs: #28, #29
Summary
This week in the
neverendingsaga of logging ingit-bundle-server
introduces child process tracing (specifically,child_start
,child_ready
, andchild_exit
trace2 events)! There's a lot in this PR that's not that, though, so to summarize:time
,t_rel
, andt_abs
fields.CommandExecutor
to both use alog.TraceLogger
(which it will need in commit 8) and make it flexible enough to replace standalone usage ofcommand.Exec()
.log.TraceLogger
&log.Trace2
(theChildProcess()
method)common.FileSystem
to handle the file writing & other usage needed by bothcron.go
s &git.go
cron.go
s andgit.go
to move their functions into structs, replacing custom file writing & command execution with use ofcommon.FileSystem
andcmd.CommandExecutor
(the latter of which includes the newly-added Trace2 child process logging).