NowLoggingService class - iOS

  • 릴리스 버전: Australia
  • 업데이트 날짜 2026년 03월 12일
  • 소요 시간: 2분
  • The NowLoggingService class provides functions that provide logging capabilities to feature services with the NowSDK.

    표 1. Properties
    Name Type Description
    logLevel NowLogLevel Level of log messages for the associated logger to store.
    Valid values:
    • debug
    • error
    • fatal
    • log
    • info
    • none

    NowLoggingService - logger(for category: NowLogCategory)

    Returns a logger for the specified feature service.

    표 2. Parameters
    Name Type Description
    for category NowLogCategory Feature service whose logger you want returned.
    Valid values:
    • analytics
    • chat
    • coresdk
    • data
    • sdk
    • web
    표 3. Returns
    Type Description
    NowLogging Logger to use to save all log messages for the associated service.

    The following code example shows how to call this function.

    let logging = NowLoggingService.logger(for: .chat)
    …
    logger.error(message: "Could not create service - service configuration invalid")
    …
    logger.debug(message: "Verifying settings…")

    NowLoggingService - setLogLevel(_ logLevel: NowLogLevel)

    Sets the desired logging level.

    주:
    Incoming log messages with types that don’t meet the set log level threshold are discarded.
    표 4. Parameters
    Name Type Description
    logLevel NowLogLevel Level of log messages for the associated logger to store.
    Valid values:
    • debug
    • error
    • fatal
    • info
    • none
    표 5. Returns
    Type Description
    None

    The following code example shows how to call this function.

    NowLoggingService.setLogLevel(.info)