Skip to content

Commit 5047e27

Browse files
Update changelogs from fern repo (#1771)
Co-authored-by: Swimburger <[email protected]>
1 parent cd182d9 commit 5047e27

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
## 3.25.0
2+
**`(feat):`** Add support for logging to the generated SDK.
3+
Users can configure the logger by passing in a `logging` object to the client options.
4+
5+
```ts
6+
import { FooClient, logging } from "foo";
7+
8+
const client = new FooClient({
9+
logging: {
10+
level: logging.LogLevel.Info, // LogLevel.Info is the default
11+
logger: new logging.ConsoleLogger(), // ConsoleLogger is the default
12+
silent: false, // true is the default, set to false to enable logging
13+
}
14+
});
15+
```
16+
17+
The `logging` object can have the following properties:
18+
- `level`: The log level to use. Defaults to `logging.LogLevel.Info`.
19+
- `logger`: The logger to use. Defaults to `logging.ConsoleLogger`.
20+
- `silent`: Whether to silence the logger. Defaults to `true`.
21+
22+
The `level` property can be one of the following values:
23+
- `logging.LogLevel.Debug`
24+
- `logging.LogLevel.Info`
25+
- `logging.LogLevel.Warn`
26+
- `logging.LogLevel.Error`
27+
28+
To provide a custom logger, users can pass in a custom logger implementation that implements the `logging.ILogger` interface.
29+
30+

0 commit comments

Comments
 (0)