Log query strings + Handle conflicts

This commit is contained in:
rxdn 2023-09-10 18:00:47 +01:00
parent d1997e1e2a
commit 80749b8827
3 changed files with 4 additions and 1 deletions

View File

@ -68,6 +68,7 @@ func Logging(minLevel Level) gin.HandlerFunc {
"status_code": strconv.Itoa(statusCode), "status_code": strconv.Itoa(statusCode),
"method": ctx.Request.Method, "method": ctx.Request.Method,
"path": ctx.Request.URL.Path, "path": ctx.Request.URL.Path,
"query": ctx.Request.URL.RawQuery,
"guild_id": ctx.Keys["guildid"], "guild_id": ctx.Keys["guildid"],
"user_id": ctx.Keys["userid"], "user_id": ctx.Keys["userid"],
"request_body": string(requestBody), "request_body": string(requestBody),

2
go.mod
View File

@ -6,7 +6,7 @@ require (
github.com/BurntSushi/toml v1.2.1 github.com/BurntSushi/toml v1.2.1
github.com/TicketsBot/archiverclient v0.0.0-20220326163414-558fd52746dc github.com/TicketsBot/archiverclient v0.0.0-20220326163414-558fd52746dc
github.com/TicketsBot/common v0.0.0-20230702161316-9b2fa80535aa 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/logarchiver v0.0.0-20220326162808-cdf0310f5e1c
github.com/TicketsBot/worker v0.0.0-20230731124103-99c6834d9134 github.com/TicketsBot/worker v0.0.0-20230731124103-99c6834d9134
github.com/apex/log v1.1.2 github.com/apex/log v1.1.2

2
go.sum
View File

@ -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/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 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-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 h1:OqGjFH6mbE6gd+NqI2ARJdtH3UUvhiAkD0r0fhGJK2s=
github.com/TicketsBot/logarchiver v0.0.0-20220326162808-cdf0310f5e1c/go.mod h1:jgi2OXQKsd5nUnTIRkwvPmeuD/i7OhN68LKMssuQY1c= 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= github.com/TicketsBot/ttlcache v1.6.1-0.20200405150101-acc18e37b261 h1:NHD5GB6cjlkpZFjC76Yli2S63/J2nhr8MuE6KlYJpQM=