Skip to content

Commit a29a63c

Browse files
committed
meta: Update changelog for latest api
1 parent 7d07964 commit a29a63c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,18 @@ Sentry.init({
2828

2929
These API are exposed in the `Sentry._experiment_log` namespace.
3030

31-
On the high level, there are functions for each of the logging severity levels `critical`, `fatal`, `error`, `warn`, `info`, `debug`, `trace`. These functions are tagged template functions, so they use a special string template syntax that we use to parameterize functions accordingly.
31+
On the high level, there are functions for each of the logging severity levels `fatal`, `error`, `warn`, `info`, `debug`, `trace`. There is also a `log` function that is an alias to `info`.
3232

3333
```js
34-
Sentry._experiment_log.info`user ${username} just bought ${item}!`;
34+
Sentry._experiment_log.info('Adding item to cart', { item: 'sneakers' });
3535
```
3636

37-
If you want more custom usage, we also expose a `captureLog` method that allows you to pass custom attributes, but it's less easy to use than the tagged template functions.
37+
If you want to do structured logging, you'll need to use the `fmt` helper exposed in the `Sentry._experiment_log` namespace.
3838

3939
```js
40-
Sentry._experiment_log.captureLog('error', 'Hello world!', { 'user.id': 123 });
40+
const { fmt } = Sentry._experiment_log;
41+
42+
Sentry._experiment_log.info(fmt`user ${username} just bought ${item}!`);
4143
```
4244

4345
## 9.4.0

0 commit comments

Comments
 (0)