1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-06-01 11:09:30 +02:00

Add visitor_seen to the log context

This commit is contained in:
binwiederhier 2023-03-03 13:56:48 -05:00
parent 166dc6b4fa
commit 1ce92714c4
3 changed files with 17 additions and 7 deletions

View file

@ -143,6 +143,7 @@ func (v *visitor) contextNoLock() log.Context {
fields := log.Context{
"visitor_id": visitorID(v.ip, v.user),
"visitor_ip": v.ip.String(),
"visitor_seen": util.FormatTime(v.seen),
"visitor_messages": info.Stats.Messages,
"visitor_messages_limit": info.Limits.MessageLimit,
"visitor_messages_remaining": info.Stats.MessagesRemaining,