Define a basic logger interface

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar
2023-03-22 14:27:43 +02:00
parent 6a04e97bca
commit a02bc27c3e
78 changed files with 307 additions and 246 deletions

View File

@@ -20,11 +20,11 @@ import (
"fmt"
"path/filepath"
"github.com/NVIDIA/nvidia-container-toolkit/internal/logger"
"github.com/NVIDIA/nvidia-container-toolkit/pkg/config/engine"
"github.com/NVIDIA/nvidia-container-toolkit/pkg/config/engine/containerd"
"github.com/NVIDIA/nvidia-container-toolkit/pkg/config/engine/crio"
"github.com/NVIDIA/nvidia-container-toolkit/pkg/config/engine/docker"
"github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"
)
@@ -43,11 +43,11 @@ const (
)
type command struct {
logger *logrus.Logger
logger logger.Interface
}
// NewCommand constructs an configure command with the specified logger
func NewCommand(logger *logrus.Logger) *cli.Command {
func NewCommand(logger logger.Interface) *cli.Command {
c := command{
logger: logger,
}