Skip to content

Commit e4f0ba3

Browse files
author
mtail
committed
Address feedback
1 parent a7b0bd7 commit e4f0ba3

File tree

13 files changed

+594
-35
lines changed

13 files changed

+594
-35
lines changed

mixer/adapter/circonus/circonus.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ func (b logToEnvLogger) Write(msg []byte) (int, error) {
209209
} else if bytes.HasPrefix(msg, []byte("[WARN]")) {
210210
b.env.Logger().Warningf(string(msg))
211211
} else if bytes.HasPrefix(msg, []byte("[DEBUG]")) {
212-
b.env.Logger().Infof(string(msg))
212+
b.env.Logger().Debugf(string(msg))
213213
} else {
214214
b.env.Logger().Infof(string(msg))
215215
}

mixer/adapter/stackdriver/metric/bufferedClient.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func (b *buffered) Send() {
6666
b.m.Lock()
6767
if len(b.buffer) == 0 {
6868
b.m.Unlock()
69-
b.l.Infof("No data to send to Stackdriver.")
69+
b.l.Debugf("No data to send to Stackdriver.")
7070
return
7171
}
7272
toSend := b.buffer
@@ -86,7 +86,7 @@ func (b *buffered) Send() {
8686
if err != nil {
8787
_ = b.l.Errorf("Stackdriver returned: %v\nGiven data: %v", err, merged)
8888
} else {
89-
b.l.Infof("Successfully sent data to Stackdriver.")
89+
b.l.Debugf("Successfully sent data to Stackdriver.")
9090
}
9191
}
9292

pkg/ctrlz/assets.gen.go

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/ctrlz/assets/templates/404.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
The URL may be misspelled
1414
</div>
1515
</div>
16-
{{ end }}
16+
{{ end }}

pkg/ctrlz/ctrlz.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ var allTopics = []fw.Topic{
4747
topics.EnvTopic(),
4848
topics.ProcTopic(),
4949
topics.ArgsTopic(),
50+
topics.VersionTopic(),
51+
topics.MetricsTopic(),
5052
}
5153

5254
func augmentLayout(layout *template.Template, page string) *template.Template {
@@ -69,7 +71,7 @@ func getLocalIP() string {
6971
}
7072

7173
for _, address := range addrs {
72-
// check the address type and if it is not a loopback the display it
74+
// check the address type and if it is not a loopback then return it
7375
if ipnet, ok := address.(*net.IPNet); ok && !ipnet.IP.IsLoopback() {
7476
if ipnet.IP.To4() != nil {
7577
return ipnet.IP.String()
@@ -95,6 +97,11 @@ func getTopics() []topic {
9597

9698
// Run starts up the ControlZ listeners.
9799
func Run(o *Options, customTopics []fw.Topic) {
100+
if o.Port == 0 {
101+
// disabled
102+
return
103+
}
104+
98105
for _, t := range customTopics {
99106
allTopics = append(allTopics, t)
100107
}
@@ -122,7 +129,7 @@ func Run(o *Options, customTopics []fw.Topic) {
122129
registerHome(router, mainLayout)
123130

124131
s := &http.Server{
125-
Addr: fmt.Sprintf(":%d", o.Port),
132+
Addr: fmt.Sprintf("127.0.0.1:%d", o.Port),
126133
Handler: router,
127134
ReadTimeout: 10 * time.Second,
128135
WriteTimeout: 10 * time.Second,

pkg/ctrlz/topics/args.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func (argsTopic) Title() string {
3535
}
3636

3737
func (argsTopic) Prefix() string {
38-
return "args"
38+
return "arg"
3939
}
4040

4141
func (argsTopic) Activate(context fw.TopicContext) {

pkg/ctrlz/topics/assets.gen.go

Lines changed: 244 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)