Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions dev/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,19 +155,29 @@
}

function setQueryLog() {
vg.coordinator().manager.logQueries(qlogToggle.checked);
const bus = coordinator().eventBus;

bus.observe("query-start", (event) =>
console.info("Query started:", event),
);
bus.observe("query-end", (event) => console.info("Query ended:", event));
bus.observe("client-connect", (event) =>
console.info("Client connected:", event),
);
bus.observe("warning", (event) => console.warn("Warning:", event));
bus.observe("error", (event) => console.error("Error:", event));
}

function setCache() {
vg.coordinator().manager.cache(cacheToggle.checked);
coordinator().manager.cache(cacheToggle.checked);
}

function setConsolidate() {
vg.coordinator().manager.consolidate(consolidateToggle.checked);
coordinator().manager.consolidate(consolidateToggle.checked);
}

function setPreAggregate() {
vg.coordinator().preaggregator.enabled = preaggToggle.checked;
coordinator().preaggregator.enabled = preaggToggle.checked;
}

function reload() {
Expand Down
16 changes: 16 additions & 0 deletions dev/query/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,22 @@
}
enable();
});

function setQueryLog() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this logic (which replicates the old logger, right?) be in mosaic core so that people can easily get the old logger behavior again?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh. we can definitely do that. My mistake, I felt that when we said 'remove the logger from core entirely,' we give the client the option to write that logic. I can put this function in core to give back a logger util to the user/client (perhaps we can discuss that idea some more (?))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC the idea was to remove the logger but give users an equivalent tool via the new bus.

const bus = vg.coordinator().eventBus;

bus.observe("query-start", (event) =>
console.info("Query started:", event),
);
bus.observe("query-end", (event) => console.info("Query ended:", event));
bus.observe("client-connect", (event) =>
console.info("Client connected:", event),
);
bus.observe("warning", (event) => console.warn("Warning:", event));
bus.observe("error", (event) => console.error("Error:", event));
}

setQueryLog()
</script>
</body>
</html>
Loading