StaticLog rename to LogUtil

This commit is contained in:
Looly
2023-05-15 20:03:12 +08:00
parent d0556a4e48
commit 4670f21a8c
22 changed files with 98 additions and 56 deletions

View File

@@ -21,8 +21,8 @@ import org.dromara.hutool.log.level.Level;
*
* @author Looly
*/
public class StaticLog {
private static final String FQCN = StaticLog.class.getName();
public class LogUtil {
private static final String FQCN = LogUtil.class.getName();
// ----------------------------------------------------------- Log method start
// ------------------------ Trace

View File

@@ -6,29 +6,29 @@ import org.dromara.hutool.log.engine.console.ConsoleLogEngine;
import org.dromara.hutool.log.engine.log4j2.Log4j2LogEngine;
import org.junit.jupiter.api.Test;
public class StaticLogTest {
public class LogUtilTest {
@Test
public void staticLog4j2Test() {
LogEngineFactory.setDefaultEngine(Log4j2LogEngine.class);
StaticLog.debug("This is static {} log", "debug");
StaticLog.info("This is static {} log", "info");
LogUtil.debug("This is static {} log", "debug");
LogUtil.info("This is static {} log", "info");
}
@Test
public void test() {
LogEngineFactory.setDefaultEngine(ConsoleLogEngine.class);
StaticLog.debug("This is static {} log", "debug");
StaticLog.info("This is static {} log", "info");
LogUtil.debug("This is static {} log", "debug");
LogUtil.info("This is static {} log", "info");
}
@Test
public void colorTest(){
LogEngineFactory.setDefaultEngine(ConsoleColorLogEngine.class);
StaticLog.debug("This is static {} log", "debug");
StaticLog.info("This is static {} log", "info");
StaticLog.error("This is static {} log", "error");
StaticLog.warn("This is static {} log", "warn");
StaticLog.trace("This is static {} log", "trace");
LogUtil.debug("This is static {} log", "debug");
LogUtil.info("This is static {} log", "info");
LogUtil.error("This is static {} log", "error");
LogUtil.warn("This is static {} log", "warn");
LogUtil.trace("This is static {} log", "trace");
}
}