⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 loginfo.java

📁 用java开发的一些实用的短信通信模块其中包含MD5加密、http发送等信息
💻 JAVA
字号:
package lib.commons.logging;

import java.util.Date;

import org.apache.commons.lang.exception.ExceptionUtils;
import org.apache.commons.lang.time.DateFormatUtils;

import lib.commons.Utils;

public class LogInfo {
	private String logName, logLevelName;

	private int logLevel;

	private boolean printStackTrace;

	private Object logMessage;

	private Throwable logThrowable;

	private Date logDate;

	public LogInfo(String logName, int logLevel, boolean printStackTrace,
			Object logMessage, Throwable logThrowable, Date logDate) {
		this.logName = logName;
		this.logLevel = logLevel;
		this.printStackTrace = printStackTrace;
		this.logMessage = logMessage;
		this.logThrowable = logThrowable;
		this.logDate = (null == logDate ? new Date() : logDate);
	}

	public String getLogName() {
		return null == logName ? Utils.EMPTY_STRING : logName;
	}

	public int getLogLevel() {
		return logLevel;
	}

	public String getLogLevelName() {
		if (null == logLevelName)
			logLevelName = LogLevel.getLevelName(logLevel);
		return logLevelName;
	}

	public boolean isPrintStackTrace() {
		return printStackTrace;
	}

	public Object getLogMessage() {
		return logMessage;
	}

	public Throwable getLogThrowable() {
		return logThrowable;
	}

	public String getLogThrowableString() {
		if (null == logThrowable)
			return null;
		return ExceptionUtils.getFullStackTrace(logThrowable);
	}

	public Date getLogDate() {
		return logDate;
	}

	public String getLogDateFormatString(String dateFormat) {
		return DateFormatUtils.format(logDate, dateFormat);
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -