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