mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
remove logtube
This commit is contained in:
parent
0d47cf1a89
commit
1a7c169058
@ -31,9 +31,9 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<Automatic-Module-Name>org.dromara.hutool.log</Automatic-Module-Name>
|
<Automatic-Module-Name>org.dromara.hutool.log</Automatic-Module-Name>
|
||||||
<!-- versions -->
|
<!-- versions -->
|
||||||
<slf4j.version>2.0.5</slf4j.version>
|
<slf4j.version>2.0.7</slf4j.version>
|
||||||
<!-- 固定1.3.x,支持到jdk8 -->
|
<!-- 固定1.3.x,支持到jdk8 -->
|
||||||
<logback.version>1.3.6</logback.version>
|
<logback.version>1.3.7</logback.version>
|
||||||
<log4j.version>1.2.17</log4j.version>
|
<log4j.version>1.2.17</log4j.version>
|
||||||
<log4j2.version>2.20.0</log4j2.version>
|
<log4j2.version>2.20.0</log4j2.version>
|
||||||
<commons-logging.version>1.2</commons-logging.version>
|
<commons-logging.version>1.2</commons-logging.version>
|
||||||
@ -100,12 +100,6 @@
|
|||||||
<version>${jboss-logging.version}</version>
|
<version>${jboss-logging.version}</version>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>io.github.logtube</groupId>
|
|
||||||
<artifactId>logtube</artifactId>
|
|
||||||
<version>${logtube.version}</version>
|
|
||||||
<optional>true</optional>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- 仅用于测试 -->
|
<!-- 仅用于测试 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -1,116 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2023 looly(loolly@aliyun.com)
|
|
||||||
* Hutool is licensed under Mulan PSL v2.
|
|
||||||
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
|
||||||
* You may obtain a copy of Mulan PSL v2 at:
|
|
||||||
* http://license.coscl.org.cn/MulanPSL2
|
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
|
||||||
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
|
||||||
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
|
||||||
* See the Mulan PSL v2 for more details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.dromara.hutool.log.engine.logtube;
|
|
||||||
|
|
||||||
import org.dromara.hutool.core.exception.ExceptionUtil;
|
|
||||||
import org.dromara.hutool.core.text.StrUtil;
|
|
||||||
import org.dromara.hutool.log.AbstractLog;
|
|
||||||
import org.dromara.hutool.log.level.Level;
|
|
||||||
import io.github.logtube.Logtube;
|
|
||||||
import io.github.logtube.core.IEventLogger;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <a href="https://github.com/logtube/logtube-java">LogTube</a> log.封装<br>
|
|
||||||
*
|
|
||||||
* @author looly
|
|
||||||
* @since 5.6.6
|
|
||||||
*/
|
|
||||||
public class LogTubeLog extends AbstractLog {
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
private final IEventLogger logger;
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------- Constructor
|
|
||||||
public LogTubeLog(final IEventLogger logger) {
|
|
||||||
this.logger = logger;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LogTubeLog(final Class<?> clazz) {
|
|
||||||
this((null == clazz) ? StrUtil.NULL : clazz.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
public LogTubeLog(final String name) {
|
|
||||||
this(Logtube.getLogger(name));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getName() {
|
|
||||||
return logger.getName();
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------- Trace
|
|
||||||
@Override
|
|
||||||
public boolean isTraceEnabled() {
|
|
||||||
return logger.isTraceEnabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void trace(final String fqcn, final Throwable t, final String format, final Object... arguments) {
|
|
||||||
log(fqcn, Level.TRACE, t, format, arguments);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------- Debug
|
|
||||||
@Override
|
|
||||||
public boolean isDebugEnabled() {
|
|
||||||
return logger.isDebugEnabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void debug(final String fqcn, final Throwable t, final String format, final Object... arguments) {
|
|
||||||
log(fqcn, Level.DEBUG, t, format, arguments);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------- Info
|
|
||||||
@Override
|
|
||||||
public boolean isInfoEnabled() {
|
|
||||||
return logger.isInfoEnabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void info(final String fqcn, final Throwable t, final String format, final Object... arguments) {
|
|
||||||
log(fqcn, Level.INFO, t, format, arguments);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------- Warn
|
|
||||||
@Override
|
|
||||||
public boolean isWarnEnabled() {
|
|
||||||
return logger.isWarnEnabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void warn(final String fqcn, final Throwable t, final String format, final Object... arguments) {
|
|
||||||
log(fqcn, Level.WARN, t, format, arguments);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------- Error
|
|
||||||
@Override
|
|
||||||
public boolean isErrorEnabled() {
|
|
||||||
return logger.isErrorEnabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void error(final String fqcn, final Throwable t, final String format, final Object... arguments) {
|
|
||||||
log(fqcn, Level.ERROR, t, format, arguments);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void log(final String fqcn, final Level level, final Throwable t, final String format, final Object... arguments) {
|
|
||||||
final String topic = level.name().toLowerCase();
|
|
||||||
logger.topic(topic)
|
|
||||||
.xStackTraceElement(ExceptionUtil.getStackElement(6), null)
|
|
||||||
.message(StrUtil.format(format, arguments))
|
|
||||||
.xException(t)
|
|
||||||
.commit();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,43 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2023 looly(loolly@aliyun.com)
|
|
||||||
* Hutool is licensed under Mulan PSL v2.
|
|
||||||
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
|
||||||
* You may obtain a copy of Mulan PSL v2 at:
|
|
||||||
* http://license.coscl.org.cn/MulanPSL2
|
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
|
||||||
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
|
||||||
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
|
||||||
* See the Mulan PSL v2 for more details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.dromara.hutool.log.engine.logtube;
|
|
||||||
|
|
||||||
import org.dromara.hutool.log.AbsLogEngine;
|
|
||||||
import org.dromara.hutool.log.Log;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <a href="https://github.com/logtube/logtube-java">LogTube</a> log. 封装<br>
|
|
||||||
*
|
|
||||||
* @author Looly
|
|
||||||
*/
|
|
||||||
public class LogTubeLogEngine extends AbsLogEngine {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 构造
|
|
||||||
*/
|
|
||||||
public LogTubeLogEngine() {
|
|
||||||
super("LogTube");
|
|
||||||
checkLogExist(io.github.logtube.Logtube.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Log createLog(final String name) {
|
|
||||||
return new LogTubeLog(name);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Log createLog(final Class<?> clazz) {
|
|
||||||
return new LogTubeLog(clazz);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2023 looly(loolly@aliyun.com)
|
|
||||||
* Hutool is licensed under Mulan PSL v2.
|
|
||||||
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
|
||||||
* You may obtain a copy of Mulan PSL v2 at:
|
|
||||||
* http://license.coscl.org.cn/MulanPSL2
|
|
||||||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
|
||||||
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
|
||||||
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
|
||||||
* See the Mulan PSL v2 for more details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* LogTube的实现封装
|
|
||||||
*
|
|
||||||
* @author looly
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
package org.dromara.hutool.log.engine.logtube;
|
|
@ -10,7 +10,6 @@
|
|||||||
# See the Mulan PSL v2 for more details.
|
# See the Mulan PSL v2 for more details.
|
||||||
#
|
#
|
||||||
|
|
||||||
org.dromara.hutool.log.engine.logtube.LogTubeLogEngine
|
|
||||||
org.dromara.hutool.log.engine.slf4j.Slf4jLogEngine
|
org.dromara.hutool.log.engine.slf4j.Slf4jLogEngine
|
||||||
org.dromara.hutool.log.engine.log4j2.Log4j2LogEngine
|
org.dromara.hutool.log.engine.log4j2.Log4j2LogEngine
|
||||||
org.dromara.hutool.log.engine.log4j.Log4jLogEngine
|
org.dromara.hutool.log.engine.log4j.Log4jLogEngine
|
||||||
|
Loading…
x
Reference in New Issue
Block a user