Skip to content
Advertisement

Configure i18next to use warning logs instead of default info level

Currently I have many logs by i18next that make difficult to use the console:

enter image description here

I need i18next to use warning level instead of default info level, in order to be able to filter them.

Im checking docs but I dont see any option. My current configuration is:

JavaScript

Advertisement

Answer

You can disable debug: false, which will disable the default console.log stuff. And and an event listener missingKey on the i18n instance.

JavaScript

Based on this code

Other option is to use the options.missingKeyHandler to pass a custom handler for handing missing keys.

JavaScript

Based on this code

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement