refactor(server): Convert existing log entries to structured format

This rewrites all existing log statements into the structured logrus
format. For consistency, all errors are always logged separately from
the primary message in a field called `error`.

Only the "info", "error" and "warn" severities are used.
This commit is contained in:
Vincent Ambo 2019-10-06 03:18:38 +01:00 committed by Vincent Ambo
parent f77c93b6ae
commit 6f148f789f
7 changed files with 243 additions and 54 deletions

View file

@ -14,7 +14,6 @@ import (
"path/filepath"
"github.com/google/nixery/server/layers"
log "github.com/sirupsen/logrus"
)
// Create a new tarball from each of the paths in the list and write the tarball
@ -33,7 +32,6 @@ func tarStorePaths(l *layers.Layer, w io.Writer) error {
return err
}
log.Printf("Created layer for '%s'\n", l.Hash())
return nil
}