mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Move SentryInit before logger.log to avoid winston exceptions
Signed-off-by: Hung-Han (Henry) Chen <chenhungh@gmail.com>
This commit is contained in:
parent
31745b38da
commit
e815461cb4
@ -61,6 +61,10 @@ import { ExtensionsStore } from "../extensions/extensions-store";
|
|||||||
import { FilesystemProvisionerStore } from "./extension-filesystem";
|
import { FilesystemProvisionerStore } from "./extension-filesystem";
|
||||||
import { SentryInit } from "../common/sentry";
|
import { SentryInit } from "../common/sentry";
|
||||||
|
|
||||||
|
// This has to be called before start using winton-based logger
|
||||||
|
// For example, before any logger.log
|
||||||
|
SentryInit();
|
||||||
|
|
||||||
const workingDir = path.join(app.getPath("appData"), appName);
|
const workingDir = path.join(app.getPath("appData"), appName);
|
||||||
const cleanup = disposer();
|
const cleanup = disposer();
|
||||||
|
|
||||||
@ -141,12 +145,6 @@ app.on("ready", async () => {
|
|||||||
|
|
||||||
UserStore.createInstance().startMainReactions();
|
UserStore.createInstance().startMainReactions();
|
||||||
|
|
||||||
/**
|
|
||||||
* There is no point setting up sentry before UserStore is initialized as
|
|
||||||
* `allowErrorReporting` will always be falsy.
|
|
||||||
*/
|
|
||||||
await SentryInit();
|
|
||||||
|
|
||||||
ClusterStore.createInstance().provideInitialFromMain();
|
ClusterStore.createInstance().provideInitialFromMain();
|
||||||
HotbarStore.createInstance();
|
HotbarStore.createInstance();
|
||||||
ExtensionsStore.createInstance();
|
ExtensionsStore.createInstance();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user