X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/cd4a811b896da640e5b8ddca7e515f19085932d4..01f48e4a0d3e979c8007ecf91d3386873961c256:/lib/deduplicationreport/command.go diff --git a/lib/deduplicationreport/command.go b/lib/deduplicationreport/command.go index 1199bc0ae2..39bbbc9498 100644 --- a/lib/deduplicationreport/command.go +++ b/lib/deduplicationreport/command.go @@ -7,21 +7,14 @@ package deduplicationreport import ( "io" - "git.arvados.org/arvados.git/lib/config" + "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), 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 @@ -32,12 +25,9 @@ func (command) RunCommand(prog string, args []string, stdin io.Reader, stdout, s } }() - logger.SetFormatter(new(NoPrefixFormatter)) - - loader := config.NewLoader(stdin, logger) - loader.SkipLegacy = true + logger.SetFormatter(cmd.NoPrefixFormatter{}) - exitcode := report(prog, args, loader, logger, stdout, stderr) + exitcode := report(prog, args, logger, stdout, stderr) return exitcode }