How to use the @vendure/core.Logger.debug function in @vendure/core

To help you get started, we’ve selected a few @vendure/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vendure-ecommerce / vendure / packages / email-plugin / src / plugin.ts View on Github external
private async handleEvent(
        handler: EmailEventHandler | EmailEventHandlerWithAsyncData,
        event: EventWithContext,
    ) {
        Logger.debug(`Handling event "${handler.type}"`, 'EmailPlugin');
        const { type } = handler;
        try {
            if (handler instanceof EmailEventHandlerWithAsyncData) {
                (event as EventWithAsyncData).data = await handler._loadDataFn({
                    event,
                    connection: this.connection,
                    inject: t => this.moduleRef.get(t, { strict: false }),
                });
            }
            const result = await handler.handle(event as any, EmailPlugin.options.globalTemplateVars);
            if (!result) {
                return;
            }
            const bodySource = await this.templateLoader.loadTemplate(type, result.templateFile);
            const generated = await this.generator.generate(
                result.from,
github vendure-ecommerce / vendure / packages / elasticsearch-plugin / src / indexer.controller.ts View on Github external
body.items.forEach(item => {
                    if (item.index) {
                        Logger.debug(JSON.stringify(item.index.error, null, 2), loggerCtx);
                    }
                    if (item.update) {
                        Logger.debug(JSON.stringify(item.update.error, null, 2), loggerCtx);
                    }
                    if (item.delete) {
                        Logger.debug(JSON.stringify(item.delete.error, null, 2), loggerCtx);
                    }
                });
            } else {