@ts-ioc/logs
Version:
tsioc is AOP, Ioc container, via typescript decorator
40 lines (38 loc) • 1.47 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const core_1 = require("@ts-ioc/core");
const aop_1 = require("@ts-ioc/aop");
const LoggerAspect_1 = require("./LoggerAspect");
/**
* Annotation logger aspect. log for class or method with @Logger decorator.
*
* @export
* @class AnnotationLogerAspect
* @extends {LoggerAspect}
*/
let AnnotationLogerAspect = class AnnotationLogerAspect extends LoggerAspect_1.LoggerAspect {
constructor(container) {
super(container);
}
logging(joinPoint, annotation) {
this.processLog(joinPoint, annotation);
}
static getClassAnnations() {
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);
exports.AnnotationLogerAspect = AnnotationLogerAspect;
//# sourceMappingURL=sourcemaps/AnnotationLogerAspect.js.map