mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-06-13 16:13:18 +02:00
Delayed deletion
This commit is contained in:
parent
9c082a8331
commit
954d919361
14 changed files with 280 additions and 131 deletions
server
|
@ -49,7 +49,7 @@ func readQueryParam(r *http.Request, names ...string) string {
|
|||
}
|
||||
|
||||
func logMessagePrefix(v *visitor, m *message) string {
|
||||
return fmt.Sprintf("%s/%s/%s", v.ip, m.Topic, m.ID)
|
||||
return fmt.Sprintf("%s/%s/%s", v.String(), m.Topic, m.ID)
|
||||
}
|
||||
|
||||
func logHTTPPrefix(v *visitor, r *http.Request) string {
|
||||
|
@ -57,7 +57,14 @@ func logHTTPPrefix(v *visitor, r *http.Request) string {
|
|||
if requestURI == "" {
|
||||
requestURI = r.URL.Path
|
||||
}
|
||||
return fmt.Sprintf("%s HTTP %s %s", v.ip, r.Method, requestURI)
|
||||
return fmt.Sprintf("%s HTTP %s %s", v.String(), r.Method, requestURI)
|
||||
}
|
||||
|
||||
func logStripePrefix(customerID, subscriptionID string) string {
|
||||
if subscriptionID != "" {
|
||||
return fmt.Sprintf("%s/%s STRIPE", customerID, subscriptionID)
|
||||
}
|
||||
return fmt.Sprintf("%s STRIPE", customerID)
|
||||
}
|
||||
|
||||
func logSMTPPrefix(state *smtp.ConnectionState) string {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue