| 
					
				 | 
			
			
				@@ -6,6 +6,7 @@ using static System.Net.Mime.MediaTypeNames; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 using Microsoft.Net.Http.Headers; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 using Microsoft.Extensions.Configuration; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 using NPOI.SS.Formula.Functions; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+using Serilog; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 namespace OASystem.API.OAMethodLib.APNs 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -27,10 +28,12 @@ namespace OASystem.API.OAMethodLib.APNs 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         private readonly IConfiguration _configuration; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         private readonly IHttpClientFactory _httpClientFactory; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        public APNsService(IConfiguration configuration, IHttpClientFactory httpClientFactory) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        private readonly Serilog.ILogger _logger; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        public APNsService(IConfiguration configuration, Serilog.ILogger logger, IHttpClientFactory httpClientFactory) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             this._configuration = configuration; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             this._httpClientFactory = httpClientFactory; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this._logger = logger; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             //APNsService.baseUrl = this._configuration["apple:pushNotificationServer"]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             APNsService.baseUrl = this._configuration["apple:pushNotificationServer_Production"]; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -173,6 +176,7 @@ namespace OASystem.API.OAMethodLib.APNs 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 result.Code = -3; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 result.Msg = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 result.Data = responseData; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                _logger.Information(string.Format(@" APNs : {0}", e.Message)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 return result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -191,5 +195,5 @@ namespace OASystem.API.OAMethodLib.APNs 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |