fix slack hook naming

This commit is contained in:
c9s 2020-08-11 08:37:27 +08:00
parent 0d9b503278
commit e2fef7b6d2
2 changed files with 3 additions and 4 deletions

View File

@ -8,12 +8,12 @@ import (
"strings"
)
type SlackLogHook struct {
type LogHook struct {
Slack *slack.Client
ErrorChannel string
}
func (t *SlackLogHook) Levels() []logrus.Level {
func (t *LogHook) Levels() []logrus.Level {
return []logrus.Level{
// log.InfoLevel,
logrus.ErrorLevel,
@ -22,7 +22,7 @@ func (t *SlackLogHook) Levels() []logrus.Level {
}
}
func (t *SlackLogHook) Fire(e *logrus.Entry) error {
func (t *LogHook) Fire(e *logrus.Entry) error {
var color = "#F0F0F0"
switch e.Level {

View File

@ -1 +0,0 @@
package slack