Skip to content

Commit

Permalink
Replace with logger
Browse files Browse the repository at this point in the history
  • Loading branch information
niwsa committed Jan 22, 2025
1 parent 17e3e4c commit f2f399c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions npm/src/ee/product/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { JacksonError } from '../../controller/error';
import { throwIfInvalidLicense } from '../common/checkLicense';
import type { Storable, JacksonOption, ProductConfig } from '../../typings';
import type { Storable, ProductConfig, JacksonOptionWithRequiredLogger } from '../../typings';

export class ProductController {
private productStore: Storable;
private opts: JacksonOption;
private opts: JacksonOptionWithRequiredLogger;

constructor({ productStore, opts }: { productStore: Storable; opts: JacksonOption }) {
constructor({ productStore, opts }: { productStore: Storable; opts: JacksonOptionWithRequiredLogger }) {
this.productStore = productStore;
this.opts = opts;
}
Expand All @@ -17,7 +17,7 @@ export class ProductController {
const productConfig = (await this.productStore.get(productId)) as ProductConfig;

// if (!productConfig) {
// console.error(`Product config not found for ${productId}`);
// this.opts.logger.error(`Product config not found for ${productId}`);
// }

return {
Expand Down
5 changes: 4 additions & 1 deletion npm/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ export const controllers = async (

const ssoTraces = new SSOTraces({ tracesStore, opts });
const eventController = new EventController({ opts: opts as JacksonOptionWithRequiredLogger });
const productController = new ProductController({ productStore, opts });
const productController = new ProductController({
productStore,
opts: opts as JacksonOptionWithRequiredLogger,
});

const connectionAPIController = new ConnectionAPIController({
connectionStore,
Expand Down

0 comments on commit f2f399c

Please sign in to comment.