mirror of
https://github.com/denoland/deno.git
synced 2024-12-26 17:19:06 -05:00
6624584dd4
Original: 25b88bcf8c
18 lines
352 B
TypeScript
18 lines
352 B
TypeScript
import { getLevelByName } from "./levels";
|
|
|
|
export class BaseHandler {
|
|
level: number;
|
|
levelName: string;
|
|
|
|
constructor(levelName) {
|
|
this.level = getLevelByName(levelName);
|
|
this.levelName = levelName;
|
|
}
|
|
|
|
handle(level, ...args) {
|
|
if (this.level > level) return;
|
|
return this._log(level, ...args);
|
|
}
|
|
|
|
_log(level, ...args) {}
|
|
}
|