mirror of
https://github.com/miniflux/v2.git
synced 2025-08-11 17:51:01 +00:00
Implement structured logging using log/slog package
This commit is contained in:
parent
54cb8fa028
commit
c0e954f19d
77 changed files with 1868 additions and 892 deletions
|
@ -7,10 +7,9 @@ import (
|
|||
"bufio"
|
||||
"bytes"
|
||||
"encoding/xml"
|
||||
"log/slog"
|
||||
"sort"
|
||||
"time"
|
||||
|
||||
"miniflux.app/v2/internal/logger"
|
||||
)
|
||||
|
||||
// Serialize returns a SubcriptionList in OPML format.
|
||||
|
@ -23,7 +22,9 @@ func Serialize(subscriptions SubcriptionList) string {
|
|||
encoder := xml.NewEncoder(writer)
|
||||
encoder.Indent("", " ")
|
||||
if err := encoder.Encode(opmlDocument); err != nil {
|
||||
logger.Error("[OPML:Serialize] %v", err)
|
||||
slog.Error("Unable to serialize OPML document",
|
||||
slog.Any("error", err),
|
||||
)
|
||||
return ""
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue