From 80749b8827844cb585450ec0c8be4fec6ced66b0 Mon Sep 17 00:00:00 2001 From: rxdn <29165304+rxdn@users.noreply.github.com> Date: Sun, 10 Sep 2023 18:00:47 +0100 Subject: [PATCH] Log query strings + Handle conflicts --- app/http/middleware/logging.go | 1 + go.mod | 2 +- go.sum | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/http/middleware/logging.go b/app/http/middleware/logging.go index 46c1dc4..ad09a2c 100644 --- a/app/http/middleware/logging.go +++ b/app/http/middleware/logging.go @@ -68,6 +68,7 @@ func Logging(minLevel Level) gin.HandlerFunc { "status_code": strconv.Itoa(statusCode), "method": ctx.Request.Method, "path": ctx.Request.URL.Path, + "query": ctx.Request.URL.RawQuery, "guild_id": ctx.Keys["guildid"], "user_id": ctx.Keys["userid"], "request_body": string(requestBody), diff --git a/go.mod b/go.mod index 4a59e3a..ab25a52 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/BurntSushi/toml v1.2.1 github.com/TicketsBot/archiverclient v0.0.0-20220326163414-558fd52746dc github.com/TicketsBot/common v0.0.0-20230702161316-9b2fa80535aa - github.com/TicketsBot/database v0.0.0-20230821182620-0130c7c2c5ad + github.com/TicketsBot/database v0.0.0-20230910170008-c25bc3ae5267 github.com/TicketsBot/logarchiver v0.0.0-20220326162808-cdf0310f5e1c github.com/TicketsBot/worker v0.0.0-20230731124103-99c6834d9134 github.com/apex/log v1.1.2 diff --git a/go.sum b/go.sum index 6a162b8..dfc2a9f 100644 --- a/go.sum +++ b/go.sum @@ -49,6 +49,8 @@ github.com/TicketsBot/common v0.0.0-20230702161316-9b2fa80535aa h1:6lMp2fzZvLpIq github.com/TicketsBot/common v0.0.0-20230702161316-9b2fa80535aa/go.mod h1:zN6qXS5AYkt4JTHtq7mHT3eBHomUWZoZ29dZ/CPMjHQ= github.com/TicketsBot/database v0.0.0-20230821182620-0130c7c2c5ad h1:tg/KYNLExb8MJbrxxlVgSjIzSEOibduE3ZV1S0uz+7Y= github.com/TicketsBot/database v0.0.0-20230821182620-0130c7c2c5ad/go.mod h1:gAtOoQKZfCkQ4AoNWQUSl51Fnlqk+odzD/hZ1e1sXyI= +github.com/TicketsBot/database v0.0.0-20230910170008-c25bc3ae5267 h1:zw33VwckXiCO/k88BSdLUYB7qWfpaojfKSwemf45xxc= +github.com/TicketsBot/database v0.0.0-20230910170008-c25bc3ae5267/go.mod h1:gAtOoQKZfCkQ4AoNWQUSl51Fnlqk+odzD/hZ1e1sXyI= github.com/TicketsBot/logarchiver v0.0.0-20220326162808-cdf0310f5e1c h1:OqGjFH6mbE6gd+NqI2ARJdtH3UUvhiAkD0r0fhGJK2s= github.com/TicketsBot/logarchiver v0.0.0-20220326162808-cdf0310f5e1c/go.mod h1:jgi2OXQKsd5nUnTIRkwvPmeuD/i7OhN68LKMssuQY1c= github.com/TicketsBot/ttlcache v1.6.1-0.20200405150101-acc18e37b261 h1:NHD5GB6cjlkpZFjC76Yli2S63/J2nhr8MuE6KlYJpQM=