Skip to content

Commit ac81c13

Browse files
committed
[no-release-notes] set log output option
1 parent a98abd7 commit ac81c13

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sql/analyzer/analyzer.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ package analyzer
1616

1717
import (
1818
"fmt"
19+
"io"
1920
"os"
2021
"reflect"
2122
"runtime/trace"
@@ -176,6 +177,10 @@ func (ab *Builder) RemoveAfterAllRule(id RuleId) *Builder {
176177

177178
var log = logrus.New()
178179

180+
func SetOutput(w io.Writer) {
181+
log.SetOutput(w)
182+
}
183+
179184
func init() {
180185
// TODO: give the option for debug analyzer logging format to match the global one
181186
log.SetFormatter(simpleLogFormatter{})

0 commit comments

Comments
 (0)