mirror of
https://github.com/sim1222/misskey.git
synced 2025-08-03 23:16:28 +09:00
improve nest logger
This commit is contained in:
@ -16,6 +16,7 @@ import { DaemonModule } from '@/daemons/DaemonModule.js';
|
||||
import { JanitorService } from '@/daemons/JanitorService.js';
|
||||
import { QueueStatsService } from '@/daemons/QueueStatsService.js';
|
||||
import { ServerStatsService } from '@/daemons/ServerStatsService.js';
|
||||
import { NestLogger } from '@/NestLogger.js';
|
||||
import { envOption } from '../env.js';
|
||||
|
||||
const _filename = fileURLToPath(import.meta.url);
|
||||
@ -78,7 +79,9 @@ export async function masterMain() {
|
||||
bootLogger.succ(`Now listening on port ${config.port} on ${config.url}`, null, true);
|
||||
|
||||
if (!envOption.noDaemons) {
|
||||
const daemons = await NestFactory.createApplicationContext(DaemonModule);
|
||||
const daemons = await NestFactory.createApplicationContext(DaemonModule, {
|
||||
logger: new NestLogger(),
|
||||
});
|
||||
daemons.enableShutdownHooks();
|
||||
daemons.get(JanitorService).start();
|
||||
daemons.get(QueueStatsService).start();
|
||||
|
@ -4,13 +4,16 @@ import { envOption } from '@/env.js';
|
||||
import { ChartManagementService } from '@/core/chart/ChartManagementService.js';
|
||||
import { ServerService } from '@/server/ServerService.js';
|
||||
import { QueueProcessorService } from '@/queue/QueueProcessorService.js';
|
||||
import { NestLogger } from '@/NestLogger.js';
|
||||
import { RootModule } from '../RootModule.js';
|
||||
|
||||
/**
|
||||
* Init worker process
|
||||
*/
|
||||
export async function workerMain() {
|
||||
const app = await NestFactory.createApplicationContext(RootModule);
|
||||
const app = await NestFactory.createApplicationContext(RootModule, {
|
||||
logger: new NestLogger(),
|
||||
});
|
||||
app.enableShutdownHooks();
|
||||
|
||||
// start server
|
||||
|
Reference in New Issue
Block a user