Logger Settings

Provides methods to enable/disable log upload and set output log level.

Index

Type aliases

DEBUG

DEBUG: 0

Outputs all API logs.

ERROR

ERROR: 3

Outputs logs of the ERROR level.

INFO

INFO: 1

Outputs logs of the WARNING and ERROR levels, together with other useful information.

NONE

NONE: 4

Outputs no log.

WARNING

WARNING: 2

Outputs logs of the WARNING and ERROR levels.

Functions

disableLogUpload

  • disableLogUpload(): void
  • Disables Log Upload

    This method disables log upload.

    By default, the log-upload function is disabled. If you have used enableLogUpload, call this method when you need to stop uploading the log.

    example

    AgoraRTC.Logger.disableLogUpload();

    Returns void

enableLogUpload

  • enableLogUpload(): void
  • Enables Log Upload

    Call this method to enable log upload to Agora’s server.

    The log-upload function is disabled by default, if you need to enable this function, please call this method before all the other methods.

    Note:

    If the user fails to join the channel, the log information will not be available on Agora’s server.

    example

    AgoraRTC.Logger.enableLogUpload();

    Returns void

setLogLevel

  • Sets the Log Level

    This method sets the output log level.

    The log level follows the sequence of NONE, ERROR, WARNING, INFO, and DEBUG. For example, if you set the log level as AgoraRTC.Logger.setLogLevel(AgoraRTC.Logger.INFO);, then you can see logs in levels ERROR and WARNING.

    Parameters

    Returns void