How to use the @vendure/core.Logger.info 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 / admin-ui-plugin / src / ui-app-compiler.service.ts View on Github external
async compileAdminUiApp(extensions: AdminUiExtension[] | undefined): Promise {
        const compiledAppExists = fs.existsSync(path.join(UI_PATH, 'index.html'));
        const extensionsWithId = this.normalizeExtensions(extensions);

        if (!compiledAppExists || this.extensionModulesHaveChanged(extensionsWithId)) {
            Logger.info('Compiling Admin UI with extensions...', loggerCtx);
            await compileAdminUiApp(path.join(__dirname, '../admin-ui'), extensionsWithId);
            Logger.info('Completed compilation!', loggerCtx);
        } else {
            Logger.verbose('Extensions not changed since last run', loggerCtx);
        }
    }
github vendure-ecommerce / vendure / packages / admin-ui-plugin / src / ui-app-compiler.service.ts View on Github external
watchAdminUiApp(extensions: AdminUiExtension[] | undefined, port: number): Watcher {
        const extensionsWithId = this.normalizeExtensions(extensions);
        Logger.info(`Starting Admin UI in Angular dev server on port ${port}`, loggerCtx);
        return watchAdminUiApp(extensionsWithId, port);
    }
github vendure-ecommerce / vendure / packages / admin-ui-plugin / src / ui-app-compiler.service.ts View on Github external
async compileAdminUiApp(extensions: AdminUiExtension[] | undefined): Promise {
        const compiledAppExists = fs.existsSync(path.join(UI_PATH, 'index.html'));
        const extensionsWithId = this.normalizeExtensions(extensions);

        if (!compiledAppExists || this.extensionModulesHaveChanged(extensionsWithId)) {
            Logger.info('Compiling Admin UI with extensions...', loggerCtx);
            await compileAdminUiApp(path.join(__dirname, '../admin-ui'), extensionsWithId);
            Logger.info('Completed compilation!', loggerCtx);
        } else {
            Logger.verbose('Extensions not changed since last run', loggerCtx);
        }
    }
github vendure-ecommerce / vendure / packages / elasticsearch-plugin / src / plugin.ts View on Github external
async onVendureBootstrap(): Promise {
        const { host, port } = ElasticsearchPlugin.options;
        try {
            const pingResult = await this.elasticsearchService.checkConnection();
        } catch (e) {
            Logger.error(`Could not connect to Elasticsearch instance at "${host}:${port}"`, loggerCtx);
            Logger.error(JSON.stringify(e), loggerCtx);
            return;
        }
        Logger.info(`Sucessfully connected to Elasticsearch instance at "${host}:${port}"`, loggerCtx);

        await this.elasticsearchService.createIndicesIfNotExists();

        this.eventBus.ofType(CatalogModificationEvent).subscribe(event => {
            if (event.entity instanceof Product || event.entity instanceof ProductVariant) {
                return this.elasticsearchIndexService.updateProductOrVariant(event.ctx, event.entity).start();
            }
        });

        const collectionModification$ = this.eventBus.ofType(CollectionModificationEvent);
        const closingNotifier$ = collectionModification$.pipe(debounceTime(50));
        collectionModification$
            .pipe(
                buffer(closingNotifier$),
                filter(events => 0 < events.length),
                map(events => ({