SBCLogger

@objc
public class SBCLogger : NSObject

Since

1.0.0
  • Adds a custom log receiver to the SendBirdCall Logger.

    override func viewDidLoad() {
       // ...
    
       SBCLogger.add(receiver: self)
    }
    

    Since

    1.0.0

    Declaration

    Swift

    @objc(addLogReceiver:)
    public static func add(receiver: SBCLogReceiver)

    Parameters

    receiver

    The object implementedSBCLogReceiver to receive logs

  • Removes the custom log receiver from the SendBirdCall Logger.

    SBCLogger.remove(receiver: self)
    

    Since

    1.0.0

    Declaration

    Swift

    @objc(removeLogReceiver:)
    public static func remove(receiver: SBCLogReceiver)

    Parameters

    receiver

    The object inherittedSBCLogReceiver

  • Update the logger level. The log level decides what kind of logs are printed to the console and delivered to custom log receivers.

    SBCLogger.setLoggerLevel(.none)
    

    Since

    1.1.0

    See

    See Also: LoggerLevel

    Declaration

    Swift

    @objc
    public static func setLoggerLevel(_ level: SBCLogger.Level)

    Parameters

    level

    The Logger Level value indicates the level to which it will be used.

  • Logger Level enumeration.

    Log will not be exposed if the priority value is lower than the configured log level. Logger Level follows the following priority:

    info < warning < error < none.

    • Cases:
      • info: Informational messages that are general to the application.

      Warning

      Potentially problematic situation that may indicate potential problems.
      • error: Error events that may represent the failure of normal program execution.
      • none: No logging.
    • Tag: LoggerLevel
    See more

    Declaration

    Swift

    @objc(SBCLoggerLevel)
    public enum Level : Int, RawRepresentable