Перейти к основному содержимому
Версия: 3.3.2

Логирование

Логи Консоли

Логи SDK позволяют вам проверить интеграцию и события, включая информацию о водопадах и ад юнитах, рекламных запросах, загрузках и другое. Мы рекомендуем всегда включать логирование в уровень debug для получения полной информации о работе SDK.

Для включения логирования используйте следующий метод перед инициализацией SDK:

Appodeal.setLogLevel(.verbose)

к сведению

Метод должен быть вызван перед инициализацией SDK.

Доступные параметры:

  • APDLogLeveloff - логи отключены;
  • APDLogFlagError - только сообщения об ошибках;
  • APDLogLevelWarning - сообщения об ошибках и предупреждениях;
  • APDLogLevelDebug - debug-сообщения;
  • APDLogLevelInfo - ошибки, предупреждения и информационные сообщения;
  • APDLogLevelVerbose - логи от Appodeal SDK и интегрированных рекламных сетей.

Подключите устройство, запустите приложение из XCode проекта. В консоли вы можете найти логи по тегу "Appodeal". Для более подробной информации о дебаге вы можете ознакомиться со следующей статьей Debugging with Xcode.

Вот пример Appodeal IOS SDK для межстраничной рекламы. Обратите внимание, что логи могут отличаться, если вы используете другой тип рекламы или другую конфигурацию SDK.

//Information about sdk initialization
[Appodeal 3.0.2] [info] [application] SDK was running on simulator
[Appodeal 3.0.2] [debug] [services] Initialize Stack Analytics service with parameters: <APDServiceConfigurationModel: 0x600002242c40>
[Appodeal 3.0.2] [debug] [services] Complete services manager initialization

//Default configuration for banner
[Appodeal 3.0.2] [debug] [impression] Banner APDAutolayoutBannerView 140615982580656 size: {320, 50} change size to {320, 50}
[Appodeal 3.0.2] [warning] [impression] Banner APDAutolayoutBannerView 140615982580656 size: {320, 50} unable to use smart sizing!

//Networks adapters and and their versions
[Appodeal 3.0.2] [info] [api] MRAID integration via SDK of version 2.0.4
[Appodeal 3.0.2] [info] [api] Crosspromo & Direct Offers integration via SDK of version 3.0.2
[Appodeal 3.0.2] [info] [api] IronSource integration via SDK of version 7.2.6
[Appodeal 3.0.2] [info] [api] AdColony integration via SDK of version 4.9.0.0
[Appodeal 3.0.2] [info] [api] NAST integration via SDK of version 2.0.4
[Appodeal 3.0.2] [info] [api] AppLovin integration via SDK of version 11.6.1
[Appodeal 3.0.2] [info] [api] Vungle Ads integration via SDK of version 6.12.1
[Appodeal 3.0.2] [info] [api] BidMachine integration via SDK of version 2.0.0.5
[Appodeal 3.0.2] [info] [api] Unity Ads integration via SDK of version 4.5.0
[Appodeal 3.0.2] [info] [api] Meta Audience Network integration via SDK of version 6.12.0
[Appodeal 3.0.2] [info] [api] VAST integration via SDK of version 2.0.4
[Appodeal 3.0.2] [info] [api] MyTarget integration via SDK of version 5.17.2
[Appodeal 3.0.2] [info] [api] A4G integration via SDK of version afma-sdk-i-v9.14.0
[Appodeal 3.0.2] [info] [api] Yandex Mobile Ads integration via SDK of version 5.2.1/4.4.0
[Appodeal 3.0.2] [info] [api] Notsy integration via SDK of version afma-sdk-i-v9.14.0
[Appodeal 3.0.2] [info] [api] Google Mobile Ads integration via SDK of version afma-sdk-i-v9.14.0

//Mediation start
[Appodeal 3.0.2] [debug] [mediation] Starting APDInterstitialAdModule
[Appodeal 3.0.2] [debug] [mediation] Starting APDAdQueueManager for "Interstitial Ad" ad request
[Appodeal 3.0.2] [info] [mediation] Trying to fetch waterfall
[Appodeal 3.0.2] [info] [mediation] Mediation start for impression: C73CF384-3844-4D18-84EC-BEB33EDC923A  

//Requesting process starts from the most expensive ad unit to the cheapest.
//SDK makes a request and, if network can’t return the ad (with result: No fill), SDK will continue to do requests until it gets an ad.(with result: Fill)
//Information and result of each requested ad unit you can find in the logs.


//Rewarded video ad unit from admob with eCPM 1000.0 is not loaded due to no fill from the network,
//SDK will continue to do requests, the next ad unit is admob with eCPM 70.0 etc. :
[Appodeal 3.0.2] [info] [mediation] Start to load Rewarded Video admob wo pricefloor admob_rewarded_video_1000.0 eCPM = 1000.000000
[Appodeal 3.0.2] [info] [mediation] Complete loading Rewarded Video admob wo pricefloor admob_rewarded_video_1000.0 eCPM = 1000.000000 with result: No fill
[Appodeal 3.0.2] [info] [mediation] Start to load Rewarded Video admob pricefloor admob_rewarded_video_70.0 eCPM = 70.000000
[Appodeal 3.0.2] [info] [mediation] Complete loading Rewarded Video admob pricefloor admob_rewarded_video_70.0 eCPM = 70.000000 with result: No fill

//The ad is loaded (fill):
[Appodeal 3.0.2] [info] [mediation] Start to load Interstitial Ad applovin wo pricefloor applovin_interstitial_0.7 eCPM = 0.700000
[Appodeal 3.0.2] [info] [mediation] Complete loading Interstitial Ad applovin wo pricefloor applovin_interstitial_0.7 eCPM = 0.700000 with result: Fill
[Appodeal 3.0.2] [debug] [mediation] Trying to proceed ad unit:Interstitial Ad backfill wo pricefloor mraid_interstitial eCPM = 0.001000
[Appodeal 3.0.2] [debug] [impression] Skip ad unit cause SDK already contains ad with eCPM: 0.70 higher than unit: Interstitial Ad backfill wo pricefloor mraid_interstitial eCPM = 0.001000
[Appodeal 3.0.2] [debug] [mediation] Break mediation
[Appodeal 3.0.2] [info] [mediation] Complete loading Interstitial Ad backfill wo pricefloor mraid_interstitial eCPM = 0.001000 with result: Break AdUnit
[Appodeal 3.0.2] [debug] [mediation] Mediation completed
[Appodeal 3.0.2] [info] [mediation] Mediation complete for impression: C73CF384-3844-4D18-84EC-BEB33EDC923A


//The ad is shown, finished, clicked and closed:
[Appodeal 3.0.2] [debug] [api] [Callback] [Interstitial] Did appear
[Appodeal 3.0.2] [debug] [impression] Impression <APDImpression: 0x600000f953b0> succesfully tracked
[Appodeal 3.0.2] [debug] [api] [Callback] [Interstitial] Did click
[Appodeal 3.0.2] [debug] [impression] Click <APDImpression: 0x600000f953b0> succesfully tracked
[Appodeal 3.0.2] [info] [impression] Track viewability finish for item: Interstitial Ad applovin wo pricefloor applovin_interstitial_0.7 eCPM = 0.700000
[Appodeal 3.0.2] [debug] [api] [Callback] [Interstitial] Did disappear

//By default auto cache is enabled, sdk starts to request ad units in the waterfall after the ad disappeared from the screen:
[Appodeal 3.0.2] [info] [impression] Prepare impression storage for reuse
[Appodeal 3.0.2] [info] [mediation] Mediation start for impression: D892B114-DDA5-4B31-BEF2-46DAD770C9B0
[Appodeal 3.0.2] [info] [mediation] Original Interstitial Ad waterfall
[Appodeal 3.0.2] [info] [mediation] Start to load Interstitial Ad admob precache wo pricefloor admob_interstitial_0.57 eCPM = 0.570000

Медиационные события

Appodeal SDK предоставляет API для логирования событий медиации. Реализуйте протокол APDActivityDelegate и установите класс делагата. Эти логи не зависят от уровня логирования Appodeal SDK (APDLogLevel).

@UIApplicationMain
final class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?

func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil
) -> Bool {
Appodeal.setActivityDelegate(self)
return true
}
}

extension AppDelegate: APDActivityDelegate {
func didReceive(_ activityLog: APDActivityLog) {
// TODO:
}
}

APDActivityLog содержит информацию о типах активности, ад юнитах, рекламных сетях и информацию специфическую конкретным событиям.

Доступные параметры:

  • APDActivityTypeMediationStart - начало опроса для рекламного блока;

  • APDActivityTypeMediationFinish - конец опроса для рекламного блока;

  • APDActivityTypeImpressionStart - начало показа для рекламного блока;

  • APDActivityTypeImpressionFinish - завершение показа для рекламного блока;

  • APDActivityTypeClick - пользовательское взаимодействие с креативом;