1 2 17 18 19 package org.apache.poi.util; 20 21 22 23 33 public class SystemOutLogger extends POILogger 34 { 35 private String cat; 36 37 public void initialize(final String cat) 38 { 39 this.cat=cat; 40 } 41 42 48 49 public void log(final int level, final Object obj1) 50 { 51 if (check(level)) 52 System.out.println("["+cat+"] "+obj1); 53 } 54 55 65 public boolean check(final int level) 66 { 67 int currentLevel = Integer.parseInt(System.getProperty("poi.log.level", WARN + "")); 68 if (level >= currentLevel) 69 return true; 70 else 71 return false; 72 } 73 74 75 } 77 | Popular Tags |