server: make some sensible sub-loggers
This commit is contained in:
parent
7458550f7a
commit
a7a663e939
2 changed files with 4 additions and 4 deletions
|
@ -1,10 +1,10 @@
|
|||
import Limiter from 'ratelimiter';
|
||||
import Logger from '@/services/logger.js';
|
||||
import { redisClient } from '@/db/redis.js';
|
||||
import { IEndpointMeta } from './endpoints.js';
|
||||
import { ApiError } from './error.js';
|
||||
import { apiLogger } from './logger.js';
|
||||
|
||||
const logger = new Logger('limiter');
|
||||
const logger = apiLogger.createSubLogger('limiter');
|
||||
|
||||
export const limiter = (limitation: IEndpointMeta['limit'] & { key: NonNullable<string> }, actor: string) => new Promise<void>((resolve, reject) => {
|
||||
if (process.env.NODE_ENV === 'test') resolve();
|
||||
|
|
|
@ -13,10 +13,10 @@ import { readNotification } from '@/server/api/common/read-notification.js';
|
|||
import { channels } from './channels/index.js';
|
||||
import Channel from './channel.js';
|
||||
import { StreamEventEmitter, StreamMessages } from './types.js';
|
||||
import Logger from '@/services/logger.js';
|
||||
import { apiLogger } from '@/server/api/logger.js';
|
||||
import { IdentifiableError } from '@/misc/identifiable-error.js';
|
||||
|
||||
const logger = new Logger('streaming');
|
||||
const logger = apiLogger.createSubLogger('streaming');
|
||||
|
||||
/**
|
||||
* Main stream connection
|
||||
|
|
Loading…
Reference in a new issue