Skip to content

Commit

Permalink
perf: debug info
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
hemengke1997 committed Dec 15, 2023
1 parent 8cd71e7 commit e52343d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export interface I18nDetectorOptions {
export async function i18nDetector(opts?: I18nDetectorOptions): Promise<any> {
const options = initOptions(opts)

debug('i18nDetector options:', options)
debug('User input i18nDetector options on init:', options)

const localeDetector = new LocaleDetector({
root: options.root,
Expand Down
8 changes: 8 additions & 0 deletions src/plugin/locale-detector/LocaleDetector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e52343d

Please sign in to comment.