1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-05-29 01:45:35 +02:00

Continued logging work

This commit is contained in:
binwiederhier 2023-02-05 23:34:27 -05:00
parent 27bd79febf
commit 7cc8c81bd8
28 changed files with 287 additions and 171 deletions
server

View file

@ -1,6 +1,7 @@
package server
import (
"heckel.io/ntfy/log"
"heckel.io/ntfy/user"
"net/http"
"net/netip"
@ -42,7 +43,7 @@ type message struct {
User string `json:"-"` // Username of the uploader, used to associated attachments
}
func (m *message) Context() map[string]any {
func (m *message) Context() log.Context {
fields := map[string]any{
"message_id": m.ID,
"message_time": m.Time,