Skip to content

Commit

Permalink
feat: log dataset ot trace
Browse files Browse the repository at this point in the history
  • Loading branch information
tpluscode committed Jan 9, 2025
1 parent 35a1601 commit ad51eef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/happy-actors-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@kopflos-cms/core": patch
---

Log API dataset to TRACE
6 changes: 6 additions & 0 deletions packages/core/lib/Kopflos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,12 @@ export default class Impl implements Kopflos {

await Promise.all(apiTriples)
log.info(`Graphs loaded. Dataset now contains ${this.dataset.size} quads`)
if (log.enabledFor('trace')) {
log.trace('API Dataset', await this.dataset.serialize({
format: 'text/turtle',
prefixes: ['sh', 'rdf', 'xsd', ['kl', this.env.ns.kopflos().value]],
}))
}
}

async stop() {
Expand Down

0 comments on commit ad51eef

Please sign in to comment.