##// END OF EJS Templates
Fixed substitution spec handling in log/ConsoleWriter
Fixed substitution spec handling in log/ConsoleWriter

File last commit:

r65:0c74a0572161 v1.2.13 default
r85:ad9a66d0ebe4 v1.3.1 default
Show More
trace.ts
48 lines | 1.3 KiB | video/mp2t | TypeScriptLexer
cin
working on support commonjs modules format
r59 import { TraceSource } from "./TraceSource";
import { Predicate } from "../interfaces";
export = {
cin
fixed "singleton" activation type handling in container configuration...
r65 level: 0,
on(filter: any, cb: any) {
cin
working on support commonjs modules format
r59 if (arguments.length === 1) {
cb = filter;
filter = undefined;
}
let test: Predicate<string>;
if (filter instanceof RegExp) {
test = chId => filter.test(chId);
} else if (filter instanceof Function) {
test = filter;
} else if (filter) {
test = chId => chId === filter;
}
if (test) {
TraceSource.on(source => {
cin
fixed "singleton" activation type handling in container configuration...
r65 source.level = this.level;
cin
working on support commonjs modules format
r59 if (test(source.id))
source.events.on(cb);
});
} else {
TraceSource.on(source => {
cin
fixed "singleton" activation type handling in container configuration...
r65 source.level = this.level;
cin
working on support commonjs modules format
r59 source.events.on(cb);
});
}
},
load(id: string, require: any, cb: (trace: TraceSource) => void) {
if (id) {
cb(TraceSource.get(id));
} else if (require.module && require.module.mid) {
cb(TraceSource.get(require.module.mid));
} else {
require(["module"], (module: { id: any; }) => {
cb(TraceSource.get(module && module.id));
});
}
},
dynamic: true
};