log: use log.Print instead of fmt.Print

This commit is contained in:
Alex Crawford
2015-05-14 17:31:57 -07:00
parent fac805dc11
commit 81ffa056bd
5 changed files with 22 additions and 21 deletions

View File

@@ -16,8 +16,8 @@ package configdrive
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"os"
"path"
@@ -93,7 +93,7 @@ func (cd *configDrive) openstackVersionRoot() string {
}
func (cd *configDrive) tryReadFile(filename string) ([]byte, error) {
fmt.Printf("Attempting to read from %q\n", filename)
log.Printf("Attempting to read from %q\n", filename)
data, err := cd.readFile(filename)
if os.IsNotExist(err) {
err = nil

View File

@@ -18,6 +18,7 @@ import (
"bufio"
"bytes"
"fmt"
"log"
"net"
"strings"
@@ -61,7 +62,7 @@ func (ms metadataService) FetchMetadata() (datasource.Metadata, error) {
return metadata, err
}
metadata.SSHPublicKeys[name] = sshkey
fmt.Printf("Found SSH key for %q\n", name)
log.Printf("Found SSH key for %q\n", name)
}
} else if _, ok := err.(pkg.ErrNotFound); !ok {
return metadata, err

View File

@@ -16,8 +16,8 @@ package waagent
import (
"encoding/xml"
"fmt"
"io/ioutil"
"log"
"net"
"os"
"path"
@@ -108,7 +108,7 @@ func (a *waagent) Type() string {
}
func (a *waagent) tryReadFile(filename string) ([]byte, error) {
fmt.Printf("Attempting to read from %q\n", filename)
log.Printf("Attempting to read from %q\n", filename)
data, err := a.readFile(filename)
if os.IsNotExist(err) {
err = nil