use of io.nuls.core.exception.NulsRuntimeException in project nuls by nuls-io.
the class Log method trace.
/**
* 提供trace级别基本的日志输出
*
* @param msg 需要显示的消息
* @param throwable 异常信息
*/
public static void trace(String msg, Throwable throwable) {
String logContent = isStringBlank(getId()) ? (getLogTrace() + ":" + msg) : (getLogTrace() + "[" + getId() + "]" + ":" + msg);
if (!(throwable instanceof NulsException) || !(throwable instanceof NulsRuntimeException)) {
throwable = new NulsException(ErrorCode.FAILED, throwable);
}
LOG.trace(logContent, throwable);
}
use of io.nuls.core.exception.NulsRuntimeException in project nuls by nuls-io.
the class Log method warn.
/**
* 提供warn级别基本的日志输出
*
* @param msg 需要显示的消息
* @param throwable 异常信息
*/
public static void warn(String msg, Throwable throwable) {
String logContent = isStringBlank(getId()) ? (getLogTrace() + ":" + msg) : (getLogTrace() + "[" + getId() + "]" + ":" + msg);
if (!(throwable instanceof NulsException) || !(throwable instanceof NulsRuntimeException)) {
throwable = new NulsException(ErrorCode.FAILED, throwable);
}
LOG.warn(logContent, throwable);
}
use of io.nuls.core.exception.NulsRuntimeException in project nuls by nuls-io.
the class Log method error.
public static void error(Throwable throwable) {
String logContent = isStringBlank(getId()) ? (getLogTrace() + ":") : (getLogTrace() + "[" + getId() + "]" + ":");
if (!(throwable instanceof NulsException) || !(throwable instanceof NulsRuntimeException)) {
throwable = new NulsException(ErrorCode.FAILED, throwable);
}
LOG.error(logContent, throwable);
}
use of io.nuls.core.exception.NulsRuntimeException in project nuls by nuls-io.
the class Log method error.
/**
* 提供error级别基本的日志输出
*
* @param msg 需要显示的消息
* @param throwable 异常信息
*/
public static void error(String msg, Throwable throwable) {
String logContent = isStringBlank(getId()) ? (getLogTrace() + ":" + msg) : (getLogTrace() + "[" + getId() + "]" + ":" + msg);
if (!(throwable instanceof NulsException) || !(throwable instanceof NulsRuntimeException)) {
throwable = new NulsException(ErrorCode.FAILED, throwable);
}
LOG.error(logContent, throwable);
}
use of io.nuls.core.exception.NulsRuntimeException in project nuls by nuls-io.
the class MsgLog method error.
/**
* 提供error级别基本的日志输出
*
* @param msg 需要显示的消息
* @param throwable 异常信息
*/
public static void error(String msg, Throwable throwable) {
String logContent = isStringBlank(getId()) ? (getLogTrace() + ":" + msg) : (getLogTrace() + "[" + getId() + "]" + ":" + msg);
if (!(throwable instanceof NulsException) || !(throwable instanceof NulsRuntimeException)) {
throwable = new NulsException(ErrorCode.FAILED, throwable);
}
LOG.error(logContent, throwable);
}
Aggregations