0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-31 09:14:20 -04:00
denoland-deno/logging/handler.ts

19 lines
352 B
TypeScript
Raw Normal View History

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) {}
}