mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
Add other thing to logger
This commit is contained in:
parent
985190c683
commit
80d592de48
|
|
@ -96,7 +96,7 @@ export class LogManager {
|
|||
|
||||
if (content_type?.includes("application/json")) {
|
||||
try {
|
||||
const json = await req.json();
|
||||
const json = await req.clone().json();
|
||||
const stringified = JSON.stringify(json, null, 4)
|
||||
.split("\n")
|
||||
.map((line) => ` ${line}`)
|
||||
|
|
@ -104,7 +104,7 @@ export class LogManager {
|
|||
|
||||
string += `${stringified}\n`;
|
||||
} catch {
|
||||
string += " [Invalid JSON]\n";
|
||||
string += ` [Invalid JSON] (raw: ${await req.text()})\n`;
|
||||
}
|
||||
} else if (
|
||||
content_type &&
|
||||
|
|
|
|||
Loading…
Reference in a new issue