File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
fern/products/sdks/overview/typescript/changelog Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 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+
You can’t perform that action at this time.
0 commit comments