mirror of
https://github.com/paricafe/misskey.git
synced 2024-12-01 11:16:43 -06:00
825551d64f
Close #9774
20 lines
525 B
TypeScript
20 lines
525 B
TypeScript
import { Inject, Injectable } from '@nestjs/common';
|
|
import { DI } from '@/di-symbols.js';
|
|
import type { Config } from '@/config.js';
|
|
import Logger from '@/logger.js';
|
|
import { bindThis } from '@/decorators.js';
|
|
import type { KEYWORD } from 'color-convert/conversions';
|
|
|
|
@Injectable()
|
|
export class LoggerService {
|
|
constructor(
|
|
@Inject(DI.config)
|
|
private config: Config,
|
|
) {
|
|
}
|
|
|
|
@bindThis
|
|
public getLogger(domain: string, color?: KEYWORD | undefined, store?: boolean) {
|
|
return new Logger(domain, color, store);
|
|
}
|
|
}
|