Calls SDKs iOS v1
Calls SDKs iOS
Calls SDKs
Version 1


Copy link

Calls SDK for iOS 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.

SBCLogger class

Copy link

To display log output to the console, implement SBCLogger.setLoggerLevel() as shown below:

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

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).



Logs that track the general events of the Calls SDK.


Logs that indicate potentially problematic situations.


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} {prefix} {type} {thread} {classFuncName} | {message}.


Copy link

This class provides the following methods:



Determines the log level which type of logs are displayed to the console and delivered to custom log receivers.


Adds a custom log receiver to the SBCLogger.


Removes a custom log receiver from the SBCLogger.

SBCLogReceiver protocol

Copy link

If you want to display log outputs in other tools such as device logs,, or on your server, implement the SBCLogReceiver protocol to your custom log class as shown below.

class CustomLogReceiver: SBCLogReceiver {
    func log(message: String) {
        #if DEBUG

class AppDelegate: UIResponder, UIApplicationDelegate {
    let myLogReceiver = CustomLogReceiver()

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        SBCLogger.add(receiver: self.myLogReceiver)