mc-publish/src/utils/logging/null-logger.ts

42 lines
661 B
TypeScript
Raw Normal View History

2022-12-13 09:45:07 -05:00
import { Logger } from "./logger";
/**
* Null logger implementation, used for discarding all log messages.
*/
export class NullLogger implements Logger {
/**
* @inheritdoc
*/
fatal(_message: string | Error): void {
// NOP
}
/**
* @inheritdoc
*/
error(_message: string | Error): void {
// NOP
}
/**
* @inheritdoc
*/
warn(_message: string | Error): void {
// NOP
}
/**
* @inheritdoc
*/
info(_message: string | Error): void {
// NOP
}
/**
* @inheritdoc
*/
debug(_message: string | Error): void {
// NOP
}
}