package com.steerinfo.dil.util; import org.apache.poi.ss.formula.functions.T; import sun.reflect.CallerSensitive; import sun.reflect.Reflection; import java.util.logging.Logger; /** * @ author :TXF * @ time :2022/2/10 21:08 */ public class Log4jUtils { public static Logger logger = null; /** * 输出日志信息 * @Author TXF * @Date 2022/2/10 21:47 * @param mes * @return **/ public static void toLoggerInfo(String mes){ logger = Logger.getLogger(new Exception().getStackTrace()[1].getClassName()); logger.info("\n" + mes); } /** * 输出警告信息 * @Author TXF * @Date 2022/2/10 21:49 * @param mes * @return **/ public static void toLoggerWarning(String mes){ logger = Logger.getLogger(new Exception().getStackTrace()[1].getClassName()); logger.warning("\n" + mes); } }