tracing: Add context to virtcontainers API

Add a `context.Context` parameter to all the virtcontainers API's to
support tracing.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
James O. D. Hunt
2018-08-14 11:49:14 +01:00
parent f0073bec2f
commit c200b28dc7
43 changed files with 902 additions and 744 deletions

View File

@@ -6,6 +6,7 @@
package oci
import (
"context"
"encoding/json"
"errors"
"fmt"
@@ -134,7 +135,7 @@ var ociLog = logrus.WithFields(logrus.Fields{
})
// SetLogger sets the logger for oci package.
func SetLogger(logger *logrus.Entry) {
func SetLogger(ctx context.Context, logger *logrus.Entry) {
fields := ociLog.Data
ociLog = logger.WithFields(fields)
}