mirror of
https://github.com/containers/podman.git
synced 2025-06-23 18:59:30 +08:00
Merge pull request #103 from surajssd/fix-debug-statement
Use debugf to allow parsing of format specifier
This commit is contained in:
@ -71,7 +71,7 @@ func attachCmd(c *cli.Context) error {
|
|||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
// Attach to the running container
|
// Attach to the running container
|
||||||
go func() {
|
go func() {
|
||||||
logrus.Debug("trying to attach to the container %s", ctr.ID())
|
logrus.Debugf("trying to attach to the container %s", ctr.ID())
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
if err := ctr.Attach(c.Bool("no-stdin"), c.String("detach-keys"), attached); err != nil {
|
if err := ctr.Attach(c.Bool("no-stdin"), c.String("detach-keys"), attached); err != nil {
|
||||||
logrus.Errorf("unable to attach to container %s: %q", ctr.ID(), err)
|
logrus.Errorf("unable to attach to container %s: %q", ctr.ID(), err)
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"reflect"
|
"reflect"
|
||||||
@ -11,15 +12,12 @@ import (
|
|||||||
|
|
||||||
"github.com/docker/go-units"
|
"github.com/docker/go-units"
|
||||||
specs "github.com/opencontainers/runtime-spec/specs-go"
|
specs "github.com/opencontainers/runtime-spec/specs-go"
|
||||||
|
|
||||||
"k8s.io/apimachinery/pkg/fields"
|
|
||||||
|
|
||||||
"fmt"
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/projectatomic/libpod/cmd/kpod/formats"
|
"github.com/projectatomic/libpod/cmd/kpod/formats"
|
||||||
"github.com/projectatomic/libpod/libpod"
|
"github.com/projectatomic/libpod/libpod"
|
||||||
"github.com/projectatomic/libpod/oci"
|
"github.com/projectatomic/libpod/oci"
|
||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
|
"k8s.io/apimachinery/pkg/fields"
|
||||||
)
|
)
|
||||||
|
|
||||||
type psOptions struct {
|
type psOptions struct {
|
||||||
|
@ -100,7 +100,7 @@ func runCmd(c *cli.Context) error {
|
|||||||
if err := ctr.Init(); err != nil {
|
if err := ctr.Init(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
logrus.Debug("container storage created for %q", ctr.ID())
|
logrus.Debugf("container storage created for %q", ctr.ID())
|
||||||
|
|
||||||
if c.String("cidfile") != "" {
|
if c.String("cidfile") != "" {
|
||||||
libpod.WriteFile(ctr.ID(), c.String("cidfile"))
|
libpod.WriteFile(ctr.ID(), c.String("cidfile"))
|
||||||
@ -119,7 +119,7 @@ func runCmd(c *cli.Context) error {
|
|||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
// Attach to the running container
|
// Attach to the running container
|
||||||
go func() {
|
go func() {
|
||||||
logrus.Debug("trying to attach to the container %s", ctr.ID())
|
logrus.Debugf("trying to attach to the container %s", ctr.ID())
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
if err := ctr.Attach(false, c.String("detach-keys"), attached); err != nil {
|
if err := ctr.Attach(false, c.String("detach-keys"), attached); err != nil {
|
||||||
logrus.Errorf("unable to attach to container %s: %q", ctr.ID(), err)
|
logrus.Errorf("unable to attach to container %s: %q", ctr.ID(), err)
|
||||||
|
@ -526,7 +526,7 @@ func (c *createConfig) GetContainerCreateOptions() ([]libpod.CtrCreateOption, er
|
|||||||
options = append(options, libpod.WithStdin())
|
options = append(options, libpod.WithStdin())
|
||||||
}
|
}
|
||||||
if c.name != "" {
|
if c.name != "" {
|
||||||
logrus.Debug("appending name %s", c.name)
|
logrus.Debugf("appending name %s", c.name)
|
||||||
options = append(options, libpod.WithName(c.name))
|
options = append(options, libpod.WithName(c.name))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,14 +2,14 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"os"
|
||||||
|
"strconv"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/projectatomic/libpod/libpod"
|
"github.com/projectatomic/libpod/libpod"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
"os"
|
|
||||||
"strconv"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -104,7 +104,7 @@ func startCmd(c *cli.Context) error {
|
|||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
// Attach to the running container
|
// Attach to the running container
|
||||||
go func() {
|
go func() {
|
||||||
logrus.Debug("trying to attach to the container %s", ctr.ID())
|
logrus.Debugf("trying to attach to the container %s", ctr.ID())
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
if err := ctr.Attach(noStdIn, c.String("detach-keys"), attached); err != nil {
|
if err := ctr.Attach(noStdIn, c.String("detach-keys"), attached); err != nil {
|
||||||
logrus.Errorf("unable to attach to container %s: %q", ctr.ID(), err)
|
logrus.Errorf("unable to attach to container %s: %q", ctr.ID(), err)
|
||||||
|
@ -2,17 +2,16 @@ package libpod
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"golang.org/x/crypto/ssh/terminal"
|
|
||||||
"io"
|
"io"
|
||||||
"net"
|
"net"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
//"strconv"
|
|
||||||
|
|
||||||
"github.com/docker/docker/pkg/term"
|
"github.com/docker/docker/pkg/term"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/projectatomic/libpod/utils"
|
"github.com/projectatomic/libpod/utils"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
|
"golang.org/x/crypto/ssh/terminal"
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
"k8s.io/client-go/tools/remotecommand"
|
"k8s.io/client-go/tools/remotecommand"
|
||||||
kubecontainer "k8s.io/kubernetes/pkg/kubelet/container"
|
kubecontainer "k8s.io/kubernetes/pkg/kubelet/container"
|
||||||
|
Reference in New Issue
Block a user