X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/3088521012dd7f5b88725240cebf163d7c8da31c..8b70a18b37ae6f5d081d469af6bcdc8ec3507e2b:/lib/deduplicationreport/command.go diff --git a/lib/deduplicationreport/command.go b/lib/deduplicationreport/command.go index 93cdb61d3b..39bbbc9498 100644 --- a/lib/deduplicationreport/command.go +++ b/lib/deduplicationreport/command.go @@ -7,20 +7,14 @@ package deduplicationreport import ( "io" + "git.arvados.org/arvados.git/lib/cmd" "git.arvados.org/arvados.git/sdk/go/ctxlog" - "github.com/sirupsen/logrus" ) var Command command type command struct{} -type NoPrefixFormatter struct{} - -func (f *NoPrefixFormatter) Format(entry *logrus.Entry) ([]byte, error) { - return []byte(entry.Message + "\n"), nil -} - // RunCommand implements the subcommand "deduplication-report ..." func (command) RunCommand(prog string, args []string, stdin io.Reader, stdout, stderr io.Writer) int { var err error @@ -31,7 +25,7 @@ func (command) RunCommand(prog string, args []string, stdin io.Reader, stdout, s } }() - logger.SetFormatter(new(NoPrefixFormatter)) + logger.SetFormatter(cmd.NoPrefixFormatter{}) exitcode := report(prog, args, logger, stdout, stderr)