setLogging static method

void setLogging(
  1. ApiLogOptions options
)

Configures the console logger without calling configure.

Use when you don't need token auth but still want to control what shows up in the logs. See ApiLogOptions for the individual switches.

Must be called before the first instance call, since the Dio client (and its logger) is built once and cached.

Example:

// Before configureDependencies() / any request.
ApiServices.setLogging(const ApiLogOptions(
  requestBody: false,
  responseBody: false,
));

Implementation

static void setLogging(ApiLogOptions options) {
  _logOptions = options;
}