Skip to content

Commit dfc3f4e

Browse files
fix(ui): move logging setup to react code
1 parent 420d8a4 commit dfc3f4e

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

invokeai/frontend/web/src/app/components/InvokeAIUI.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
import 'i18n';
22

3+
import { configureLogging } from 'app/logging/logger';
34
import { addStorageListeners } from 'app/store/enhancers/reduxRemember/driver';
45
import { $store } from 'app/store/nanostores/store';
56
import { createStore } from 'app/store/store';
67
import Loading from 'common/components/Loading/Loading';
78
import React, { lazy, memo, useEffect, useState } from 'react';
89
import { Provider } from 'react-redux';
910

11+
/*
12+
* We need to configure logging before anything else happens - useLayoutEffect ensures we set this at the first
13+
* possible opportunity.
14+
*
15+
* Once redux initializes, we will check the user's settings and update the logging config accordingly. See
16+
* `useSyncLoggingConfig`.
17+
*/
18+
configureLogging(true, 'debug', '*');
19+
1020
const App = lazy(() => import('./App'));
1121

1222
const InvokeAIUI = () => {

invokeai/frontend/web/src/app/logging/logger.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,3 @@ export const configureLogging = (
8383

8484
ROARR.write = createLogWriter({ styleOutput });
8585
};
86-
87-
/*
88-
* We need to configure logging before anything else happens - useLayoutEffect ensures we set this at the first
89-
* possible opportunity.
90-
*
91-
* Once redux initializes, we will check the user's settings and update the logging config accordingly. See
92-
* `useSyncLoggingConfig`.
93-
*/
94-
configureLogging(true, 'debug', '*');

0 commit comments

Comments
 (0)