@@ -25,7 +25,7 @@ import (
2525
2626 "github.com/GoogleCloudPlatform/container-diff/differs"
2727 pkgutil "github.com/GoogleCloudPlatform/container-diff/pkg/util"
28- "github.com/golang/glog "
28+ "github.com/sirupsen/logrus "
2929 "github.com/spf13/cobra"
3030)
3131
@@ -44,7 +44,7 @@ var diffCmd = &cobra.Command{
4444 },
4545 Run : func (cmd * cobra.Command , args []string ) {
4646 if err := diffImages (args [0 ], args [1 ], strings .Split (types , "," )); err != nil {
47- glog .Error (err )
47+ logrus .Error (err )
4848 os .Exit (1 )
4949 }
5050 },
@@ -71,7 +71,7 @@ func diffImages(image1Arg, image2Arg string, diffArgs []string) error {
7171 var wg sync.WaitGroup
7272 wg .Add (2 )
7373
74- glog . Infof ("Starting diff on images %s and %s, using differs: %s" , image1Arg , image2Arg , diffArgs )
74+ fmt . Printf ("Starting diff on images %s and %s, using differs: %s\n " , image1Arg , image2Arg , diffArgs )
7575
7676 imageMap := map [string ]* pkgutil.Image {
7777 image1Arg : {},
@@ -84,13 +84,13 @@ func diffImages(image1Arg, image2Arg string, diffArgs []string) error {
8484
8585 prepper , err := getPrepperForImage (imageName )
8686 if err != nil {
87- glog .Error (err )
87+ logrus .Error (err )
8888 return
8989 }
9090 image , err := prepper .GetImage ()
9191 imageMap [imageName ] = & image
9292 if err != nil {
93- glog .Warningf ("Diff may be inaccurate: %s" , err )
93+ logrus .Warningf ("Diff may be inaccurate: %s" , err )
9494 }
9595 }(imageArg , imageMap )
9696 }
@@ -101,16 +101,16 @@ func diffImages(image1Arg, image2Arg string, diffArgs []string) error {
101101 defer pkgutil .CleanupImage (* imageMap [image2Arg ])
102102 }
103103
104+ fmt .Println ("Computing diffs" )
104105 req := differs.DiffRequest {* imageMap [image1Arg ], * imageMap [image2Arg ], diffTypes }
105106 diffs , err := req .GetDiff ()
106107 if err != nil {
107108 return fmt .Errorf ("Could not retrieve diff: %s" , err )
108109 }
109- glog .Info ("Retrieving diffs" )
110110 outputResults (diffs )
111111
112112 if save {
113- glog .Infof ("Images were saved at %s and %s" , imageMap [image1Arg ].FSPath ,
113+ logrus .Infof ("Images were saved at %s and %s" , imageMap [image1Arg ].FSPath ,
114114 imageMap [image2Arg ].FSPath )
115115 }
116116 return nil
0 commit comments