mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
update log15 (#9622)
* Update log15 and go-isatty * Update usage in pkg log
This commit is contained in:
committed by
Torkel Ödegaard
parent
9e697a1f6e
commit
93ac6680ab
@@ -14,7 +14,7 @@ import (
|
||||
|
||||
"github.com/go-stack/stack"
|
||||
"github.com/inconshreveable/log15"
|
||||
"github.com/inconshreveable/log15/term"
|
||||
isatty "github.com/mattn/go-isatty"
|
||||
|
||||
"github.com/grafana/grafana/pkg/util"
|
||||
)
|
||||
@@ -157,7 +157,7 @@ func getFilters(filterStrArray []string) map[string]log15.Lvl {
|
||||
func getLogFormat(format string) log15.Format {
|
||||
switch format {
|
||||
case "console":
|
||||
if term.IsTty(os.Stdout.Fd()) {
|
||||
if isatty.IsTerminal(os.Stdout.Fd()) {
|
||||
return log15.TerminalFormat()
|
||||
}
|
||||
return log15.LogfmtFormat()
|
||||
|
||||
Reference in New Issue
Block a user