Log4j扩展 - Log4jYahoo
openkk
13年前
Log4jYahoo 是一个 Log4j 的扩展,用来将所有的异常信息发送到 Yahoo 的邮箱上。示例代码:
import org.apache.log4j.Logger; public class App { private static Logger logger = Logger.getLogger(App.class); public static void main(String[] args) throws InterruptedException { logger.trace("trace message"); logger.warn("warn message"); // only error msgs will be emailed logger.error("error message, a very long error message!"); Thread.sleep(2000); } }