Skip to content

Commit

Permalink
feat(notifications): add
Browse files Browse the repository at this point in the history
  • Loading branch information
ArielHAlba committed Aug 18, 2022
1 parent 3bbbe7e commit f34ac90
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,16 @@ func Panicf(format string, v ...interface{}) {
Panic(fmt.Sprintf(format, v...))
}

// AddHook adds hook to the logger
func AddHook(hook Hook) {
logger.Hooks = append(logger.Hooks, hook)
}

// EmptyHooks empties the hooks of the logger
func EmptyHooks(hook Hook) {
logger.Hooks = []Hook{}
}

func (li *MetaInfo) log() {
nowStr := time.Now().Format(timeFormat)
switch li.Lvl {
Expand Down

0 comments on commit f34ac90

Please sign in to comment.