|  |  | @ -93,20 +93,28 @@ public class LogMsgSendFilter extends LevelFilter { | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 	/** | 
			
		
	
		
			
				
					|  |  |  | 	 * desc:获取服务 ip及profile信息 | 
			
		
	
		
			
				
					|  |  |  | 	 * | 
			
		
	
		
			
				
					|  |  |  | 	 */ | 
			
		
	
		
			
				
					|  |  |  | 	private void getServerInfo() { | 
			
		
	
		
			
				
					|  |  |  | 		if (serverIp == null) { | 
			
		
	
		
			
				
					|  |  |  | 			InetUtils inetUtils = SpringContextUtils.getBean(InetUtils.class); | 
			
		
	
		
			
				
					|  |  |  | 			serverIp = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress(); | 
			
		
	
		
			
				
					|  |  |  | 		try { | 
			
		
	
		
			
				
					|  |  |  | 			if (serverIp == null) { | 
			
		
	
		
			
				
					|  |  |  | 				InetUtils inetUtils = SpringContextUtils.getBean(InetUtils.class); | 
			
		
	
		
			
				
					|  |  |  | 				serverIp = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress(); | 
			
		
	
		
			
				
					|  |  |  | 			} | 
			
		
	
		
			
				
					|  |  |  | 		} catch (Exception e) { | 
			
		
	
		
			
				
					|  |  |  | 			logger.warn("getServerInfo get bean InetUtils exception", e); | 
			
		
	
		
			
				
					|  |  |  | 			return; | 
			
		
	
		
			
				
					|  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  | 		if (activeEnv == null) { | 
			
		
	
		
			
				
					|  |  |  | 			Environment environment = SpringContextUtils.getBean(Environment.class); | 
			
		
	
		
			
				
					|  |  |  | 			String[] activeProfiles = environment.getActiveProfiles(); | 
			
		
	
		
			
				
					|  |  |  | 			if (activeProfiles != null && activeProfiles.length > 0) { | 
			
		
	
		
			
				
					|  |  |  | 				logger.info("activeProfiles:{}", activeProfiles); | 
			
		
	
		
			
				
					|  |  |  | 				activeEnv = activeProfiles[0]; | 
			
		
	
		
			
				
					|  |  |  | 		try { | 
			
		
	
		
			
				
					|  |  |  | 			if (activeEnv == null) { | 
			
		
	
		
			
				
					|  |  |  | 				Environment environment = SpringContextUtils.getBean(Environment.class); | 
			
		
	
		
			
				
					|  |  |  | 				String[] activeProfiles = environment.getActiveProfiles(); | 
			
		
	
		
			
				
					|  |  |  | 				if (activeProfiles != null && activeProfiles.length > 0) { | 
			
		
	
		
			
				
					|  |  |  | 					logger.info("activeProfiles:{}", activeProfiles); | 
			
		
	
		
			
				
					|  |  |  | 					activeEnv = activeProfiles[0]; | 
			
		
	
		
			
				
					|  |  |  | 				} | 
			
		
	
		
			
				
					|  |  |  | 			} | 
			
		
	
		
			
				
					|  |  |  | 		} catch (Exception e) { | 
			
		
	
		
			
				
					|  |  |  | 			logger.warn("getServerInfo get bean Environment exception", e); | 
			
		
	
		
			
				
					|  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  | 	} | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | 
 |