?? log.java
字號:
package com.liuwan.log;
/**
* <p>Title: Develop game research</p>
*
* <p>Description: Develop game research</p>
*
* <p>Copyright: Copyright (c) 2005</p>
*
* <p>Company: Liuwan studio</p>
*
* @author Liuwan
* @version 1.0
*/
import java.util.Date;
public class Log {
public Log() {
}
/**
* 捕捉錯誤,輸出錯誤系統日志
* @param s 錯誤描述
* @param throwable 捕捉到的異常類
*/
public static void error(String s, Throwable throwable) {
System.out.println(new Date(System.currentTimeMillis()).toString() + " [ " + s + " ] " + throwable);
}
/**
* 捕捉錯誤,輸出錯誤系統日志
* @param throwable
*/
public static void error(Throwable throwable) {
System.out.println("Error: "+new Date(System.currentTimeMillis()).toString() + " [ " + throwable +" ]");
}
public static void error(String errorMsg) {
System.out.println("Error: "+new Date(System.currentTimeMillis()).toString() + " [ " + errorMsg + " ]");
}
public static void error(String className, String methodName,
String errorMsg) {
System.out.println("Error: " +
new Date(System.currentTimeMillis()).toString() +
" class: " + className + " methodName: " +
methodName + " [ " + errorMsg + " ]");
}
public static void message(String msg) {
System.out.println("Message: " + " [ " + msg + " ]");
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -