Logging

This section provides information on API Builder logging components. API Builder streams log messages to the console, enabling integration with third-party log aggregation tools. For additional information on integrating API Builder logging with a third-party log aggregation tool, refer to Export API Builder Logs into a Data Store.

Configure logging

The logLevel can be set in the configuration. See Project Configuration.

Logger methods

The following methods are available on the API Builder logger in order of severity. Enabling a certain log level will print logs of severity levels before it.

  • fatal( ...params ): Logs a message with a fatal-level severity. 
  • error( ...params ): Logs a message with an error-level severity.
  • warn( ...params ): Logs a message with a warn-level severity.
  • info( ...params ): Logs a message with an info-level severity.
  • debug( ...params ): Logs a message with a debug-level severity.
  • trace( ...params ): Logs a message with a trace-level severity.

Related Links