feat(alerting): trying to get things to work with new model

This commit is contained in:
Torkel Ödegaard
2016-06-11 13:49:11 +02:00
parent 0ef6801117
commit 71c1c0ab65
5 changed files with 21 additions and 5 deletions

View File

@@ -12,6 +12,7 @@ import (
"gopkg.in/ini.v1"
"github.com/go-stack/stack"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15/term"
)
@@ -228,3 +229,9 @@ func LogFilterHandler(maxLevel log15.Lvl, filters map[string]log15.Lvl, h log15.
return r.Lvl <= maxLevel
}, h)
}
func Stack(skip int) string {
call := stack.Caller(skip)
s := stack.Trace().TrimBelow(call).TrimRuntime()
return s.String()
}