3.28.0

(feat): Added Generation Metadata file to output.

3.25.0

(feat): Add support for logging to the generated SDK. Users can configure the logger by passing in a logging object to the client options.

1import { FooClient, logging } from "foo";
2
3const client = new FooClient({
4 logging: {
5 level: logging.LogLevel.Info, // LogLevel.Info is the default
6 logger: new logging.ConsoleLogger(), // ConsoleLogger is the default
7 silent: false, // true is the default, set to false to enable logging
8 }
9});

The logging object can have the following properties:

  • level: The log level to use. Defaults to logging.LogLevel.Info.
  • logger: The logger to use. Defaults to logging.ConsoleLogger.
  • silent: Whether to silence the logger. Defaults to true.

The level property can be one of the following values:

  • logging.LogLevel.Debug
  • logging.LogLevel.Info
  • logging.LogLevel.Warn
  • logging.LogLevel.Error

To provide a custom logger, users can pass in a custom logger implementation that implements the logging.ILogger interface.