123456789101112131415161718192021222324252627282930313233343536373839404142 |
- 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);
- }
- }
|