次の方法で共有


iOS での SDK ログ記録の構成

このページには、次の手順があります。

  • ログ記録のオンとオフの切り替え、およびログ レベルの設定
  • 通知のサブスクリプションの有効化と通知の状態の取得

ログ レベルを有効にして設定する

インターフェイスで次のメソッドを使用して、 ANLogManager iOS SDK のログ レベルを設定できます。

  • getANLogLevel
  • setANLogLevel

[ANLogManager setANLogLevel:ANLogLevelDebug];

注:

使用可能なすべてのログ レベルを参照してください ANLogManager.h

通知オブザーバーを有効または無効にし、通知の状態を取得する

さらに、アプリでこれらのログを取り込み、さらに処理を行う場合に、ログを通知として投稿できるようにするオプションもあります。 インターフェイスで次のメソッドを ANLogManager 使用して、iOS SDK ログの通知状態を設定および取得できます。

  • setNotificationsEnabled

  • isNotificationsEnabled

    /**
    Enable to subscribe for Notifications
    */
    + (void)setNotificationsEnabled:(BOOL)enabled;
    /**
    Get Notification Status
    */
    + (BOOL)isNotificationsEnabled;
    

// To Enable Notifications Observer
[ANLogManager setNotificationsEnabled:YES];
// To get the status of current Notifications Observer
[ANLogManager isNotificationsEnabled]