mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-06-27 06:40:36 +02:00
Logging improvements, etc.
This commit is contained in:
parent
f7f343fe55
commit
8215b66db3
12 changed files with 155 additions and 80 deletions
server
|
@ -44,16 +44,11 @@ func (s *Server) execManager() {
|
|||
"rate_visitor_user_id": vrate.MaybeUserID(),
|
||||
})
|
||||
}
|
||||
ev.
|
||||
Fields(log.Context{
|
||||
"message_topic": t.ID,
|
||||
"message_topic_subscribers": subs,
|
||||
}).
|
||||
Trace("- topic %s: %d subscribers", t.ID, subs)
|
||||
ev.With(t).Trace("- topic %s: %d subscribers", t.ID, subs)
|
||||
}
|
||||
msgs, exists := messageCounts[t.ID]
|
||||
if t.Stale() && (!exists || msgs == 0) {
|
||||
log.Tag(tagManager).Field("message_topic", t.ID).Trace("Deleting empty topic %s", t.ID)
|
||||
log.Tag(tagManager).With(t).Trace("Deleting empty topic %s", t.ID)
|
||||
emptyTopics++
|
||||
delete(s.topics, t.ID)
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue