Calls SDKs JavaScript v1
Calls SDKs JavaScript
Calls SDKs
JavaScript
Version 1

Logger

Copy link

Calls SDK for JavaScript offers a logging system that allows you to keep track of a number of events and activities while running your app. You can closely monitor the operation of the Calls SDK and improve debug efficiency using our log system.


How to enable logging in the SDK

Copy link

To display log output to the console, specify log level by using the setLoggerLevel() method as shown below:

SendBirdCall.setLoggerLevel(SendBirdCall.LoggerLevel.INFO);

Log levels

Copy link

Log levels can be used to control log outputs. If logging is enabled at the specified log level, it also enables logging at all higher levels. The priority level of logs are in the following order: INFO (0) < WARNING (1) < ERROR (2) < NONE (3).

LevelDescription

INFO

Logs that track the general events of the Calls SDK.

WARNING

Logs that indicate potentially problematic situations.

ERROR

Logs that represent the failure of the Calls SDK execution.

NONE (default)

Not used for writing log outputs.

Note: Calls SDKs for iOS and JavaScript share the same order for the priority level of logs.


Log format

Copy link

The log output is written in the following format: {date time} {log level} | {message}.