@@ -33,7 +33,7 @@ class LocalAdProvider implements AdProvider {
3333 /// This implementation does not require any specific SDK initialization.
3434 @override
3535 Future <void > initialize () async {
36- _logger.info ('Local Ad Provider initialized (no specific SDK to init).' );
36+ _logger.info ('LocalAdProvider: Local Ad Provider initialized (no specific SDK to init).' );
3737 }
3838
3939 @override
@@ -43,19 +43,20 @@ class LocalAdProvider implements AdProvider {
4343 required AdThemeStyle adThemeStyle,
4444 HeadlineImageStyle ? headlineImageStyle, // Added for interface consistency
4545 }) async {
46+ _logger.info ('LocalAdProvider: loadNativeAd called for adId: $adId ' );
4647 if (adId == null || adId.isEmpty) {
47- _logger.warning ('No local native ad ID provided.' );
48+ _logger.warning ('LocalAdProvider: No local native ad ID provided.' );
4849 return null ;
4950 }
5051
51- _logger.info ('Attempting to load local native ad with ID: $adId ' );
52+ _logger.info ('LocalAdProvider: Attempting to load local native ad with ID: $adId ' );
5253
5354 try {
5455 final localNativeAd = await _localAdRepository.read (id: adId);
5556
5657 if (localNativeAd is LocalNativeAd ) {
5758 _logger.info (
58- 'Local native ad loaded successfully: ${localNativeAd .id }' ,
59+ 'LocalAdProvider: Local native ad loaded successfully: ${localNativeAd .id }' ,
5960 );
6061 return NativeAd (
6162 id: _uuid.v4 (),
@@ -67,17 +68,17 @@ class LocalAdProvider implements AdProvider {
6768 );
6869 } else {
6970 _logger.warning (
70- 'Fetched ad with ID $adId is not a LocalNativeAd. '
71+ 'LocalAdProvider: Fetched ad with ID $adId is not a LocalNativeAd. '
7172 'Received type: ${localNativeAd .runtimeType }' ,
7273 );
7374 return null ;
7475 }
7576 } on HttpException catch (e) {
76- _logger.severe ('Error fetching local native ad with ID $adId : $e ' );
77+ _logger.severe ('LocalAdProvider: Error fetching local native ad with ID $adId : $e ' );
7778 return null ;
7879 } catch (e, s) {
7980 _logger.severe (
80- 'Unexpected error loading local native ad with ID $adId : $e ' ,
81+ 'LocalAdProvider: Unexpected error loading local native ad with ID $adId : $e ' ,
8182 e,
8283 s,
8384 );
@@ -92,19 +93,20 @@ class LocalAdProvider implements AdProvider {
9293 required AdThemeStyle adThemeStyle,
9394 HeadlineImageStyle ? headlineImageStyle, // Added for interface consistency
9495 }) async {
96+ _logger.info ('LocalAdProvider: loadBannerAd called for adId: $adId ' );
9597 if (adId == null || adId.isEmpty) {
96- _logger.warning ('No local banner ad ID provided.' );
98+ _logger.warning ('LocalAdProvider: No local banner ad ID provided.' );
9799 return null ;
98100 }
99101
100- _logger.info ('Attempting to load local banner ad with ID: $adId ' );
102+ _logger.info ('LocalAdProvider: Attempting to load local banner ad with ID: $adId ' );
101103
102104 try {
103105 final localBannerAd = await _localAdRepository.read (id: adId);
104106
105107 if (localBannerAd is LocalBannerAd ) {
106108 _logger.info (
107- 'Local banner ad loaded successfully: ${localBannerAd .id }' ,
109+ 'LocalAdProvider: Local banner ad loaded successfully: ${localBannerAd .id }' ,
108110 );
109111 return BannerAd (
110112 id: _uuid.v4 (),
@@ -113,17 +115,17 @@ class LocalAdProvider implements AdProvider {
113115 );
114116 } else {
115117 _logger.warning (
116- 'Fetched ad with ID $adId is not a LocalBannerAd. '
118+ 'LocalAdProvider: Fetched ad with ID $adId is not a LocalBannerAd. '
117119 'Received type: ${localBannerAd .runtimeType }' ,
118120 );
119121 return null ;
120122 }
121123 } on HttpException catch (e) {
122- _logger.severe ('Error fetching local banner ad with ID $adId : $e ' );
124+ _logger.severe ('LocalAdProvider: Error fetching local banner ad with ID $adId : $e ' );
123125 return null ;
124126 } catch (e, s) {
125127 _logger.severe (
126- 'Unexpected error loading local banner ad with ID $adId : $e ' ,
128+ 'LocalAdProvider: Unexpected error loading local banner ad with ID $adId : $e ' ,
127129 e,
128130 s,
129131 );
@@ -137,19 +139,20 @@ class LocalAdProvider implements AdProvider {
137139 required String ? adId,
138140 required AdThemeStyle adThemeStyle,
139141 }) async {
142+ _logger.info ('LocalAdProvider: loadInterstitialAd called for adId: $adId ' );
140143 if (adId == null || adId.isEmpty) {
141- _logger.warning ('No local interstitial ad ID provided.' );
144+ _logger.warning ('LocalAdProvider: No local interstitial ad ID provided.' );
142145 return null ;
143146 }
144147
145- _logger.info ('Attempting to load local interstitial ad with ID: $adId ' );
148+ _logger.info ('LocalAdProvider: Attempting to load local interstitial ad with ID: $adId ' );
146149
147150 try {
148151 final localInterstitialAd = await _localAdRepository.read (id: adId);
149152
150153 if (localInterstitialAd is LocalInterstitialAd ) {
151154 _logger.info (
152- 'Local interstitial ad loaded successfully: ${localInterstitialAd .id }' ,
155+ 'LocalAdProvider: Local interstitial ad loaded successfully: ${localInterstitialAd .id }' ,
153156 );
154157 return InterstitialAd (
155158 id: _uuid.v4 (),
@@ -158,17 +161,17 @@ class LocalAdProvider implements AdProvider {
158161 );
159162 } else {
160163 _logger.warning (
161- 'Fetched ad with ID $adId is not a LocalInterstitialAd. '
164+ 'LocalAdProvider: Fetched ad with ID $adId is not a LocalInterstitialAd. '
162165 'Received type: ${localInterstitialAd .runtimeType }' ,
163166 );
164167 return null ;
165168 }
166169 } on HttpException catch (e) {
167- _logger.severe ('Error fetching local interstitial ad with ID $adId : $e ' );
170+ _logger.severe ('LocalAdProvider: Error fetching local interstitial ad with ID $adId : $e ' );
168171 return null ;
169172 } catch (e, s) {
170173 _logger.severe (
171- 'Unexpected error loading local interstitial ad with ID $adId : $e ' ,
174+ 'LocalAdProvider: Unexpected error loading local interstitial ad with ID $adId : $e ' ,
172175 e,
173176 s,
174177 );
0 commit comments