Facet tree debug output

This commit is contained in:
Tony Garnock-Jones 2018-11-26 15:44:11 +00:00
parent 7eaa07de57
commit 3713745a45
1 changed files with 12 additions and 0 deletions

View File

@ -107,6 +107,18 @@ function bootModule(mod) {
process.on('SIGQUIT', () => {
console.log('---------------------------------------------------------------------------');
console.log(g.index.root._debugString());
console.log('FACET TREE');
g.actors.forEach((a) => {
console.log(' ' + a.toString());
function walkFacet(indent, f) {
console.log(indent + f.toString());
f.endpoints.forEach((ep) => {
console.log(indent + ' - ' + ep.id + ': ' + (ep.assertion && ep.assertion.toString()));
});
f.children.forEach((child) => { walkFacet(indent + ' ', child); });
}
a.rootFacet.children.forEach((child) => { walkFacet(' ', child); });
});
console.log('ACTORS');
g.actors.forEach((a) => console.log(' ' + a.toString()));
});