CommunitySolidServer/src/logging/VoidLoggerFactory.ts
Joachim Van Herwegen 6248ed0938 refactor: Replace linting configurations
The previous package was outdated, preventing us from updating TS.
This one also lints YAML and JSON,
and applies many more rules to the test files,
explaining all the changes in this PR.
2023-11-02 09:49:17 +01:00

15 lines
441 B
TypeScript

import type { LoggerFactory } from './LoggerFactory';
import { VoidLogger } from './VoidLogger';
/**
* A factory that always returns {@link VoidLogger}, which does nothing on log messages.
*/
export class VoidLoggerFactory implements LoggerFactory {
private readonly logger = new VoidLogger();
// eslint-disable-next-line unused-imports/no-unused-vars
public createLogger(label: string): VoidLogger {
return this.logger;
}
}