Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/platforms/javascript/common/logs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ description: "Structured logs allow you to send, view and query logs sent from y
sidebar_order: 5755
notSupported:
- javascript.deno
- javascript.electron
- javascript.cordova
- javascript.capacitor
---
Expand Down
10 changes: 5 additions & 5 deletions docs/product/explore/logs/getting-started/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ To set up Sentry Logs, use the links below for supported SDKs. After it's been s
label="Connect"
url="/platforms/javascript/guides/connect/logs/"
/>
- <LinkWithPlatformIcon
platform="javascript.electron"
label="Electron"
url="/platforms/javascript/guides/electron/logs/"
/>
- <LinkWithPlatformIcon
platform="javascript.ember"
label="Ember"
Expand Down Expand Up @@ -233,11 +238,6 @@ We're actively working on adding Log functionality to additional SDKs. Check out
label="Elixir"
url="https://github.com/getsentry/sentry-elixir/issues/886"
/>
- <LinkWithPlatformIcon
platform="javascript.electron"
label="Electron"
url="https://github.com/getsentry/sentry-electron/issues/1154"
/>
- <LinkWithPlatformIcon
platform="react-native"
label="React Native"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<Include name="logs/javascript-console-logging-integration.mdx" />
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Logs for JavaScript are supported in Sentry Electron SDK version [`6.7.0`](https://github.com/getsentry/sentry-electron/releases/tag/6.7.0) and above.
25 changes: 25 additions & 0 deletions platform-includes/logs/setup/javascript.electron.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
To enable logging, you need to initialize the SDK in the renderer and main processes with the `_experiments.enableLogs` option set to `true`.

First update the main process file.

```js
import * as Sentry from "@sentry/electron/main";

Sentry.init({
dsn: "___PUBLIC_DSN___",
// Enable logs to be sent to Sentry
_experiments: { enableLogs: true },
});
```

Then update all your renderer processes.

```js
import * as Sentry from "@sentry/electron/renderer";

Sentry.init({
dsn: "___PUBLIC_DSN___",
// Enable logs to be sent to Sentry
_experiments: { enableLogs: true },
});
```
1 change: 1 addition & 0 deletions platform-includes/logs/usage/javascript.electron.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<Include name="logs/javascript-usage.mdx" />