Skip to content

Commit ff085e8

Browse files
authored
Fix log so that it writes to stderr and not log file (#277)
* Create two seperate metrics - one with a watch type and the other without * fix log level * put config back
1 parent d7d425d commit ff085e8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/sloop/server/server.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import (
3131
"github.com/salesforce/sloop/pkg/sloop/webserver"
3232
)
3333

34-
const alsologtostderr = "alsologtostderr"
34+
const logtostderr = "logtostderr"
3535

3636
func RealMain() error {
3737
defer glog.Flush()
@@ -187,14 +187,14 @@ func RealMain() error {
187187
}
188188

189189
// By default glog will not print anything to console, which can confuse users
190-
// This will turn it on unless user sets it explicitly (with --alsologtostderr=false)
190+
// This will turn it on unless user sets it explicitly (with --logtostderr=false)
191191
func setupStdErrLogging() {
192192
for _, arg := range os.Args[1:] {
193-
if strings.Contains(arg, alsologtostderr) {
193+
if strings.Contains(arg, logtostderr) {
194194
return
195195
}
196196
}
197-
err := flag.Set("alsologtostderr", "true")
197+
err := flag.Set("logtostderr", "true")
198198
if err != nil {
199199
panic(err)
200200
}

0 commit comments

Comments
 (0)