log Sigar.load errors
This commit is contained in:
		
							parent
							
								
									d1e5277554
								
							
						
					
					
						commit
						2685ee0321
					
				@ -31,7 +31,14 @@ public class Sigar implements SigarProxy {
 | 
				
			|||||||
        try {
 | 
					        try {
 | 
				
			||||||
            load();
 | 
					            load();
 | 
				
			||||||
        } catch (SigarException e) {
 | 
					        } catch (SigarException e) {
 | 
				
			||||||
            //will find out later when invoking methods.
 | 
					            String msg = "Sigar.load: " + e.getMessage();
 | 
				
			||||||
 | 
					            try {
 | 
				
			||||||
 | 
					                SigarLog.error(msg, e);
 | 
				
			||||||
 | 
					            } catch (NoClassDefFoundError ne) {
 | 
				
			||||||
 | 
					                //no log4j.jar
 | 
				
			||||||
 | 
					                System.err.println(msg);
 | 
				
			||||||
 | 
					                e.printStackTrace();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user