mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-01-06 16:04:26 +01:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user