Skip to content

Commit

Permalink
feat: pass logger into cache plugin constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
rgwozdz committed Feb 7, 2024
1 parent 8ace35a commit 1ddc0ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/beige-lemons-beg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@koopjs/koop-core': minor
---

- pass logger into cache-plugin constructor
2 changes: 1 addition & 1 deletion packages/core/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class Koop extends Events {
}

#registerCache(Cache, options) {
this.cache = new Cache(options);
this.cache = new Cache({ logger: options?.logger || this.log, options });
this.log.info(`registered cache: ${Cache.name} v${Cache.version}`);
}

Expand Down

0 comments on commit 1ddc0ca

Please sign in to comment.