# SDK logs (/en/realtime-media/im/reference/sdk-logs/web)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

If you’re troubleshooting an issue with the Agora Chat SDK, Agora support team might ask you to send the SDK logs. Logs record information about events that occurred in the SDK. These include errors and warnings as well as informational events.

## Collecting SDK logs

* Enable log output:

  ```javascript
  AC.logger.enableAll();
  ```

* Disable log output:

  ```javascript
  AC.logger.disableAll();
  ```

* Set the level of logs to be output:

  ```javascript
  // 0 - 5 or 'TRACE'，'DEBUG'，'INFO'，'WARN'，'ERROR'，'SILENT'.
  AC.logger.setLevel(0);
  ```

* Set whether to cache logs:

  ```javascript
  AC.logger.setConfig({
    useCache: false, // Whether to cache logs.
    maxCache: 3 * 1024 * 1024, // The maximum number of bytes of logs that can be cached.
  });
  // Cache logs of all levels
  AC.logger.setLevel(0);
  ```

* Download logs:

  ```javascript
  AC.logger.download();
  ```

    
  
      
  
      
  
      
  
      
  
