mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-15 08:53:08 +02:00
8099bc24e1
* refactor(backend): use node16 for moduleResolution
* update deps
* Update tsconfig.json
* ✌️
* revive KEYWORD
* restore strict-event-emitter-types dependency
* restore ms dependency
* cancel redundant import reorder
* fix
* Delete ms.ts
* remove rndstr
---------
Co-authored-by: Kagami Sascha Rosylight <saschanaz@outlook.com>
20 lines
528 B
TypeScript
20 lines
528 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.js';
|
|
|
|
@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);
|
|
}
|
|
}
|