1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-07-22 17:18:37 +00:00

Implement structured logging using log/slog package

This commit is contained in:
Frédéric Guillot 2023-09-24 16:32:09 -07:00
parent 54cb8fa028
commit c0e954f19d
77 changed files with 1868 additions and 892 deletions

View file

@ -7,12 +7,12 @@ import (
"encoding/base64"
"fmt"
"html"
"log/slog"
"net/url"
"regexp"
"strings"
"miniflux.app/v2/internal/config"
"miniflux.app/v2/internal/logger"
"github.com/PuerkitoBio/goquery"
"github.com/yuin/goldmark"
@ -359,7 +359,9 @@ func addHackerNewsLinksUsing(entryContent, app string) string {
open_with_hack := `<a href="` + url + `">Open with HACK</a>`
a.Parent().AppendHtml(" " + open_with_hack)
} else {
logger.Error("[openHackerNewsLinksWith] unknown app provided: %q", app)
slog.Warn("Unknown app provided for openHackerNewsLinksWith rewrite rule",
slog.String("app", app),
)
return
}
})