about summary refs log tree commit diff
path: root/tools/nixery/server/config
diff options
context:
space:
mode:
Diffstat (limited to 'tools/nixery/server/config')
-rw-r--r--tools/nixery/server/config/config.go9
-rw-r--r--tools/nixery/server/config/pkgsource.go12
2 files changed, 5 insertions, 16 deletions
diff --git a/tools/nixery/server/config/config.go b/tools/nixery/server/config/config.go
index 9447975aa9a2..fe05734ee6ac 100644
--- a/tools/nixery/server/config/config.go
+++ b/tools/nixery/server/config/config.go
@@ -36,16 +36,11 @@ func signingOptsFromEnv() *storage.SignedURLOptions {
 		return nil
 	}
 
-	log.WithFields(log.Fields{
-		"account": id,
-	}).Info("GCS URL signing enabled")
+	log.WithField("account", id).Info("GCS URL signing enabled")
 
 	k, err := ioutil.ReadFile(path)
 	if err != nil {
-		log.WithFields(log.Fields{
-			"file":  path,
-			"error": err,
-		}).Fatal("failed to read GCS signing key")
+		log.WithError(err).WithField("file", path).Fatal("failed to read GCS signing key")
 	}
 
 	return &storage.SignedURLOptions{
diff --git a/tools/nixery/server/config/pkgsource.go b/tools/nixery/server/config/pkgsource.go
index 3a817f3d76d3..95236c4b0d15 100644
--- a/tools/nixery/server/config/pkgsource.go
+++ b/tools/nixery/server/config/pkgsource.go
@@ -132,9 +132,7 @@ func (p *PkgsPath) CacheKey(pkgs []string, tag string) string {
 // specified, the Nix code will default to a recent NixOS channel.
 func pkgSourceFromEnv() (PkgSource, error) {
 	if channel := os.Getenv("NIXERY_CHANNEL"); channel != "" {
-		log.WithFields(log.Fields{
-			"channel": channel,
-		}).Info("using Nix package set from Nix channel or commit")
+		log.WithField("channel", channel).Info("using Nix package set from Nix channel or commit")
 
 		return &NixChannel{
 			channel: channel,
@@ -142,9 +140,7 @@ func pkgSourceFromEnv() (PkgSource, error) {
 	}
 
 	if git := os.Getenv("NIXERY_PKGS_REPO"); git != "" {
-		log.WithFields(log.Fields{
-			"repo": git,
-		}).Info("using NIx package set from git repository")
+		log.WithField("repo", git).Info("using NIx package set from git repository")
 
 		return &GitSource{
 			repository: git,
@@ -152,9 +148,7 @@ func pkgSourceFromEnv() (PkgSource, error) {
 	}
 
 	if path := os.Getenv("NIXERY_PKGS_PATH"); path != "" {
-		log.WithFields(log.Fields{
-			"path": path,
-		}).Info("using Nix package set at local path")
+		log.WithField("path", path).Info("using Nix package set at local path")
 
 		return &PkgsPath{
 			path: path,