move to zerolog
This commit is contained in:
@ -1,8 +1,9 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"regexp"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
func regexpSelectN(n int, regexps []string, names []string) (matches []string) {
|
||||
@ -16,7 +17,7 @@ func regexpSelectN(n int, regexps []string, names []string) (matches []string) {
|
||||
for _, reStr := range regexps {
|
||||
re, err := regexp.Compile(reStr)
|
||||
if err != nil {
|
||||
log.Printf("warning: invalid regexp ignored: %q: %v", reStr, err)
|
||||
log.Warn().Err(err).Str("regexp", reStr).Msg("invalid regexp, ignored")
|
||||
continue
|
||||
}
|
||||
res = append(res, re)
|
||||
|
Reference in New Issue
Block a user