UNPKG

@triviality/logger

Version:

Typescript loggers with an interface that support composition

32 lines 1.41 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var AbstractFunctionLogger_1 = require("./AbstractFunctionLogger"); var TsLogLogger = /** @class */ (function (_super) { __extends(TsLogLogger, _super); function TsLogLogger(logger) { var _this = _super.call(this) || this; _this.logger = logger; _this.trace = _this.logger.trace.bind(_this.logger); _this.debug = _this.logger.debug.bind(_this.logger); _this.info = _this.logger.info.bind(_this.logger); _this.warn = _this.logger.warn.bind(_this.logger); _this.error = _this.logger.error.bind(_this.logger); return _this; } return TsLogLogger; }(AbstractFunctionLogger_1.AbstractFunctionLogger)); exports.TsLogLogger = TsLogLogger; //# sourceMappingURL=TsLogLogger.js.map