2023-07-27 00:31:52 -05:00
|
|
|
/*
|
2024-02-13 09:59:27 -06:00
|
|
|
* SPDX-FileCopyrightText: syuilo and misskey-project
|
2023-07-27 00:31:52 -05:00
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2023-08-04 20:33:00 -05:00
|
|
|
import { Injectable } from '@nestjs/common';
|
2022-09-18 09:07:41 -05:00
|
|
|
import Logger from '@/logger.js';
|
2022-12-04 00:03:09 -06:00
|
|
|
import { bindThis } from '@/decorators.js';
|
2023-06-25 07:13:15 -05:00
|
|
|
import type { KEYWORD } from 'color-convert/conversions.js';
|
2022-09-18 09:07:41 -05:00
|
|
|
|
|
|
|
@Injectable()
|
|
|
|
export class LoggerService {
|
|
|
|
constructor(
|
|
|
|
) {
|
|
|
|
}
|
|
|
|
|
2022-12-04 00:03:09 -06:00
|
|
|
@bindThis
|
2022-12-13 09:01:45 -06:00
|
|
|
public getLogger(domain: string, color?: KEYWORD | undefined, store?: boolean) {
|
2023-02-03 00:08:36 -06:00
|
|
|
return new Logger(domain, color, store);
|
2022-09-18 09:07:41 -05:00
|
|
|
}
|
|
|
|
}
|