refactor: ♻️ Rewrite logging logic into a unified package
Some checks failed
Mirror to Codeberg / Mirror (push) Failing after 0s
Test Publish / build (client) (push) Failing after 0s
Test Publish / build (sdk) (push) Failing after 0s

This commit is contained in:
Jesse Wierzbinski 2025-06-22 18:43:03 +02:00
parent e1bd389bf1
commit aff51b651c
No known key found for this signature in database
32 changed files with 479 additions and 402 deletions

View file

@ -1,5 +1,5 @@
import { getLogger } from "@logtape/logtape";
import { apiRoute } from "@versia-server/kit/api";
import { federationMessagingLogger } from "@versia-server/logging";
import chalk from "chalk";
import { describeRoute } from "hono-openapi";
@ -19,8 +19,7 @@ export default apiRoute((app) =>
async (context) => {
const content = await context.req.text();
getLogger(["federation", "messaging"])
.info`Received message via ${chalk.bold("Instance Messaging")}:\n${content}`;
federationMessagingLogger.info`Received message via ${chalk.bold("Instance Messaging")}:\n${content}`;
return context.text("", 200);
},