Commit 98d9df54 authored by Henry's avatar Henry

remove utils.PErr()

parent 2ed154bd
......@@ -43,7 +43,7 @@ func printRefs(n *core.IpfsNode, nd *mdag.Node, refSeen map[u.Key]bool, recursiv
if recursive {
nd, err := n.DAG.Get(u.Key(link.Hash))
if err != nil {
u.PErr("error: cannot retrieve %s (%s)\n", link.Hash.B58String(), err)
log.Error("error: cannot retrieve %s (%s)\n", link.Hash.B58String(), err)
return
}
......
......@@ -37,7 +37,7 @@ func init() {
var err error
currentVersion, err = semver.NewVersion(Version)
if err != nil {
u.PErr("The const Version literal in version.go needs to be in semver format: %s \n", Version)
log.Error("The const Version literal in version.go needs to be in semver format: %s \n", Version)
os.Exit(1)
}
}
......
......@@ -17,11 +17,6 @@ var LogFormat = "%{color}%{time:2006-01-02 15:04:05.999999} %{shortfile} %{level
// loggers is the set of loggers in the system
var loggers = map[string]*logging.Logger{}
// PErr is a shorthand printing function to output to Stderr.
func PErr(format string, a ...interface{}) {
fmt.Fprintf(os.Stderr, format, a...)
}
// POut is a shorthand printing function to output to Stdout.
func POut(format string, a ...interface{}) {
fmt.Fprintf(os.Stdout, format, a...)
......@@ -39,8 +34,7 @@ func SetupLogging() {
if logenv := os.Getenv("IPFS_LOGGING"); logenv != "" {
lvl, err = logging.LogLevel(logenv)
if err != nil {
PErr("invalid logging level: %s\n", logenv)
PErr("using logging.DEBUG\n")
log.Error("invalid logging level: %s\n", logenv)
lvl = logging.DEBUG
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment