@ts-ioc/logs
Version:
tsioc is AOP, Ioc container, via typescript decorator
42 lines (40 loc) • 1.72 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var core_1 = require("@ts-ioc/core");
var aop_1 = require("@ts-ioc/aop");
var LoggerAspect_1 = require("./LoggerAspect");
/**
* Annotation logger aspect. log for class or method with @Logger decorator.
*
* @export
* @class AnnotationLogerAspect
* @extends {LoggerAspect}
*/
var AnnotationLogerAspect = /** @class */ (function (_super) {
tslib_1.__extends(AnnotationLogerAspect, _super);
function AnnotationLogerAspect(container) {
return _super.call(this, container) || this;
}
AnnotationLogerAspect.prototype.logging = function (joinPoint, annotation) {
this.processLog(joinPoint, annotation);
};
AnnotationLogerAspect.getClassAnnations = function () {
return { "name": "AnnotationLogerAspect", "params": { "constructor": ["container"], "logging": ["joinPoint", "annotation"] } };
};
tslib_1.__decorate([
aop_1.Pointcut('@annotation(Logger)', 'annotation'),
tslib_1.__metadata("design:type", Function),
tslib_1.__metadata("design:paramtypes", [aop_1.Joinpoint, Array]),
tslib_1.__metadata("design:returntype", void 0)
], AnnotationLogerAspect.prototype, "logging", null);
AnnotationLogerAspect = tslib_1.__decorate([
core_1.Singleton(),
aop_1.Aspect(),
tslib_1.__param(0, core_1.Inject(core_1.ContainerToken)),
tslib_1.__metadata("design:paramtypes", [Object])
], AnnotationLogerAspect);
return AnnotationLogerAspect;
}(LoggerAspect_1.LoggerAspect));
exports.AnnotationLogerAspect = AnnotationLogerAspect;
//# sourceMappingURL=sourcemaps/AnnotationLogerAspect.js.map