From e52343dc3c95a0aa44e7ad61af6c1f2900585309 Mon Sep 17 00:00:00 2001 From: hemengke <23536175@qq.com> Date: Fri, 15 Dec 2023 15:58:05 +0800 Subject: [PATCH] perf: debug info [ci skip] --- src/plugin/index.ts | 2 +- src/plugin/locale-detector/LocaleDetector.ts | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/plugin/index.ts b/src/plugin/index.ts index 023353a..63544ec 100644 --- a/src/plugin/index.ts +++ b/src/plugin/index.ts @@ -63,7 +63,7 @@ export interface I18nDetectorOptions { export async function i18nDetector(opts?: I18nDetectorOptions): Promise { const options = initOptions(opts) - debug('i18nDetector options:', options) + debug('User input i18nDetector options on init:', options) const localeDetector = new LocaleDetector({ root: options.root, diff --git a/src/plugin/locale-detector/LocaleDetector.ts b/src/plugin/locale-detector/LocaleDetector.ts index 4682499..7b98211 100644 --- a/src/plugin/locale-detector/LocaleDetector.ts +++ b/src/plugin/locale-detector/LocaleDetector.ts @@ -86,6 +86,14 @@ export class LocaleDetector { debug(`šŸ—ƒ Path Matcher: ${this._pathMatcher.matcher}`) } + debug(`\nšŸ’Æ The real i18nDetector options: `, { + root: this._rootPath, + localesPaths: this._localesPaths, + pathMatcher: this._pathMatcher.matcher, + parserPlugins: this.getParsers(), + namespace: this._namespace, + }) + await this.loadAll() debug(`šŸ“‚ Loaded files:`, this.files)