Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added interface for logger #385

Merged
merged 1 commit into from
Dec 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions container.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ package testcontainers
import (
"context"
"io"
"log"
"os"

"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
Expand All @@ -16,9 +14,6 @@ import (
"github.com/testcontainers/testcontainers-go/wait"
)

// Logger is the default log instance
var Logger = log.New(os.Stderr, "", log.LstdFlags)

// DeprecatedContainer shows methods that were supported before, but are now deprecated
// Deprecated: Use Container
type DeprecatedContainer interface {
Expand Down
14 changes: 14 additions & 0 deletions logger.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package testcontainers

import (
"log"
"os"
)

// Logger is the default log instance
var Logger Logging = log.New(os.Stderr, "", log.LstdFlags)

// Logging defines the Logger interface
type Logging interface {
Printf(format string, v ...interface{})
}