Skip to content

Commit 5a6e05a

Browse files
committed
logging docs
1 parent 62e3f81 commit 5a6e05a

File tree

1 file changed

+19
-7
lines changed
  • packages/web/docs/src/content/api-reference

1 file changed

+19
-7
lines changed

packages/web/docs/src/content/api-reference/client.mdx

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -358,13 +358,6 @@ The amount of time after which a pending usage reporting batch should be sent in
358358

359359
Provide a custom WHATWG `fetch` implementation
360360

361-
###### `logger`
362-
363-
- Type: [`console`](https://developer.mozilla.org/en-US/docs/Web/API/console)
364-
- Default: `globalThis.console`
365-
366-
Console object to use for logging info, errors and debug information.
367-
368361
###### `circuitBreaker`
369362

370363
- Type: `AgentCircuitBreakerConfiguration`
@@ -468,6 +461,25 @@ useHive({
468461
})
469462
```
470463

464+
#### Logging
465+
466+
You can customize the logging level or provide your own (JSON) logger implementation.
467+
468+
#### `logger`
469+
470+
- Type: [`Logger`](/docs/logger) or log level string
471+
- Default: `info`
472+
473+
It is possible to provide the following options:
474+
475+
- `'trace'`
476+
- `'debug'`
477+
- `'info'` default
478+
- `'warn'`
479+
- `'error'`
480+
481+
Alternatvily, you can also provide your own [`Logger`](/docs/logger) (or API compatible) instance.
482+
471483
#### Custom Integration
472484

473485
If your GraphQL server is not listed above, you can implement a custom integration. Start by

0 commit comments

Comments
 (0)