fixup logging

parent 8dfc00a7
Pipeline #205 failed with stages
in 0 seconds
0.1.0: QmcwwSZ4fCjy8exboUmqCdVsX1r2ddDb9DHyA4pgnQvdwD
0.1.1: QmWTHakXvEmW44Muyy1wGGzoWA4tntuuvd8BhBbmLYBzSx
package metricsprometheus
import (
"fmt"
"os"
"runtime/debug"
"strings"
......@@ -16,15 +14,14 @@ var log logging.EventLogger = logging.Logger("metrics-prometheus")
func init() {
err := metrics.InjectImpl(newCreator)
if err != nil {
fmt.Fprintln(os.Stderr,
"Failed to inject go-metrics-prometheus into go-metrics-interface.")
log.Errorf("Failed to inject go-metrics-prometheus into go-metrics-interface.")
debug.PrintStack()
}
}
func newCreator(name, helptext string) metrics.Creator {
return &creator{
name: strings.Replace(helptext, ".", "_", -1),
name: strings.Replace(name, ".", "_", -1),
helptext: helptext,
}
}
......
......@@ -10,7 +10,7 @@
"gxDependencies": [
{
"author": "whyrusleeping",
"hash": "QmdUib18JngJSGT4YhcG1J1wwMtNKGWzwnTEWowYuYCkwd",
"hash": "QmR3KwhXCRLTNZB59vELb2HhEWrGy9nuychepxFtj3wWYa",
"name": "client_golang",
"version": "0.1.0"
},
......@@ -19,11 +19,16 @@
"hash": "QmVWBQQAz4Cd2XgW9KgQoqXXrU8KJoCb9WCrhWRFVBKvFe",
"name": "go-metrics-interface",
"version": "0.1.1"
},
{
"hash": "QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52",
"name": "go-log",
"version": "1.2.0"
}
],
"gxVersion": "0.9.0",
"language": "go",
"license": "MIT",
"name": "go-metrics-prometheus",
"version": "0.1.0"
"version": "0.1.1"
}
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