refactor(server): enhance the Logger usage (#9763)

This commit is contained in:
Brooooooklyn
2025-01-17 12:12:14 +00:00
parent d8727c2001
commit 779029148e
5 changed files with 16 additions and 19 deletions

View File

@@ -4,6 +4,7 @@ import cookieParser from 'cookie-parser';
import graphqlUploadExpress from 'graphql-upload/graphqlUploadExpress.mjs';
import {
AFFiNELogger,
CacheInterceptor,
CloudThrottlerGuard,
GlobalExceptionFilter,
@@ -20,8 +21,11 @@ export async function createApp() {
cors: true,
rawBody: true,
bodyParser: true,
bufferLogs: true,
});
app.useLogger(app.get(AFFiNELogger));
if (AFFiNE.server.path) {
app.setGlobalPrefix(AFFiNE.server.path);
}