mirror of
https://github.com/denoland/deno.git
synced 2024-12-17 21:03:01 -05:00
7143f7d860
Original: 0772030f5d
18 lines
355 B
TypeScript
18 lines
355 B
TypeScript
import { getLevelByName } from "./levels.ts";
|
|
|
|
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) {}
|
|
}
|