Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
logging: Fix structured logging in store package
Browse files Browse the repository at this point in the history
Call the `store` packages `SetLogger()` function to ensure all its log
records contain all required structured logging fields.

Fixes: #2644.

Signed-off-by: James O. D. Hunt <[email protected]>
  • Loading branch information
jodh-intel committed Apr 24, 2020
1 parent 10b2302 commit 23aa94e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions virtcontainers/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"github.com/kata-containers/runtime/virtcontainers/persist"
"github.com/kata-containers/runtime/virtcontainers/pkg/compatoci"
vcTypes "github.com/kata-containers/runtime/virtcontainers/pkg/types"
"github.com/kata-containers/runtime/virtcontainers/store"
"github.com/kata-containers/runtime/virtcontainers/types"
specs "github.com/opencontainers/runtime-spec/specs-go"
opentracing "github.com/opentracing/opentracing-go"
Expand Down Expand Up @@ -50,6 +51,7 @@ func SetLogger(ctx context.Context, logger *logrus.Entry) {

deviceApi.SetLogger(virtLog)
compatoci.SetLogger(virtLog)
store.SetLogger(virtLog)
}

// CreateSandbox is the virtcontainers sandbox creation entry point.
Expand Down

0 comments on commit 23aa94e

Please sign in to comment.