cn.tangjiabao.halodb.utils.logger.LogUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of haloDb Show documentation
Show all versions of haloDb Show documentation
Orm whitch The highest development efficiency and Efficiency is the fastest
package cn.tangjiabao.halodb.utils.logger;
/**
* 日志组件
* @author [email protected]
* @date 2015-6-14 下午10:36:14
*/
public class LogUtils {
/**
* 美化日志输出
* @param message
* @return Object
*/
public static String format(Object... message) {
StringBuffer sb = new StringBuffer();
for (Object object : message) {
sb.append("\n").append(String.valueOf(object));
}
return sb.toString();
}
/**
* 简单美化输出
* @param info
* @param message
* @return Object
*/
public static String formatOL(String info, Object message) {
StringBuffer sb = new StringBuffer();
sb.append("\n").append(info).append(":::").append(String.valueOf(message));
return sb.toString();
}
/**
* 输出数组
* @param info
* @param attr
* @return Object
*/
public static String attr(String info, Object[] attr) {
StringBuffer sb = new StringBuffer();
sb.append("\n").append(info).append("\n");
for (Object object : attr) {
sb.append(String.valueOf(object)).append(";");
}
return sb.toString();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy