mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-06-02 03:20:34 +02:00
Logging fixes
This commit is contained in:
parent
0606fbe60a
commit
f7f343fe55
3 changed files with 13 additions and 5 deletions
server
|
@ -30,6 +30,10 @@ const (
|
|||
tagMatrix = "matrix"
|
||||
)
|
||||
|
||||
var (
|
||||
normalErrorCodes = []int{http.StatusNotFound, http.StatusBadRequest, http.StatusTooManyRequests, http.StatusUnauthorized, http.StatusInsufficientStorage}
|
||||
)
|
||||
|
||||
// logr creates a new log event with HTTP request fields
|
||||
func logr(r *http.Request) *log.Event {
|
||||
return log.Tag(tagHTTP).Fields(httpContext(r)) // Tag may be overwritten
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue