mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 13:59:16 +01:00
refactor: ♻️ Rewrite logging logic into a unified package
This commit is contained in:
parent
e1bd389bf1
commit
aff51b651c
32 changed files with 479 additions and 402 deletions
|
|
@ -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);
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue