log level = error 수준으로 교체

This commit is contained in:
toki 2026-03-19 07:47:42 +09:00
parent 1d4a8d5b87
commit dce5874400
2 changed files with 15 additions and 0 deletions

View file

@ -12,6 +12,16 @@ import {observeCurrentUser} from '@queries/servers/user';
import type Database from '@nozbe/watermelondb/Database';
// Suppress missing translation warnings in development
const onIntlError = (err: any) => {
if (__DEV__ && err.code === 'MISSING_TRANSLATION') {
// Silently ignore missing translations in dev mode
return;
}
// eslint-disable-next-line no-console
console.error(err);
};
type Props = {
locale: string;
children: React.ReactNode;
@ -30,6 +40,7 @@ const UserLocaleProvider = ({locale, children}: Props) => {
<IntlProvider
locale={locale}
messages={getTranslations(locale)}
onError={onIntlError}
>
{children}
</IntlProvider>
@ -44,6 +55,7 @@ export function withUserLocale<T extends WithUserLocaleProps>(Component: Compone
<IntlProvider
locale={locale}
messages={getTranslations(locale)}
onError={onIntlError}
>
<Component
{...props}

View file

@ -29,6 +29,9 @@ if (__DEV__) {
'new NativeEventEmitter',
]);
// Suppress warning-level logs in Metro terminal, show errors only
console.warn = () => {};
// Ignore all notifications if running e2e
const isRunningE2e = RUNNING_E2E === 'true';
logInfo(`RUNNING_E2E: ${RUNNING_E2E}, isRunningE2e: ${isRunningE2e}`);