@@ -0,0 +1,2008 @@
+package idea.inspired.core.util;%0A%0Aimport java.text.SimpleDateFormat;%0Aimport java.util.Date;%0A%0A/**%0A * The class is used to pipe messages into some output streams.%0A * %0A * @author tsungjung411@yahoo.com.tw%0A * @since 2013/02/16%0A * @see %7B@link System#out%7D%0A * @see %7B@link System#err%7D%0A */%0Apublic class Log %7B%0A%09%0A%09public static final String DATE_FORMAT = %22yyyy/MM/dd HH:mm:ss%22;%0A%09%0A%09/**%0A%09 * Output a verbose log message.%0A%09 * @param message%0A%09 */%0A%09public static void v(String message) %7B%0A%09%09// Outputs the message to the standard output steam (normally %0A%09%09// mapped to the console screen).%0A%09%09System.out.println(message);%0A%09%7D%0A%09%0A%09/**%0A%09 * Output a verbose log message with the specific tag.%0A%09 * @param tag%0A%09 * @param message%0A%09 */%0A%09public static void v(String tag, String message) %7B%0A%09%09StringBuilder builder = new StringBuilder();%0A%09%09%0A%09%09if (message != null) %7B%0A%09%09%09String %5B%5D lines = message.split(%22%5Cr%7C%5Cn%22);%0A%09%09%09%0A%09%09%09// presents in multi-line%0A%09%09%09for (int i = 0; i %3C lines.length; i++) %7B%0A%09%09%09%09builder.append(tag).append(%22: %22).append(lines%5Bi%5D);%0A%09%09%09%7D%0A%09%09%7D%0A%09%09%0A%09%09// Outputs the message to the standard output steam (normally %0A%09%09// mapped to the console screen).%0A%09%09System.out.println(builder.toString());%0A%09%7D%0A%09%0A%09/**%0A%09 * Output a verbose date/time in standard format with the specific%0A%09 * tag.%0A%09 * @param tag%0A%09 * @param date%0A%09 */%0A%09public static void v(String tag, Date date) %7B%0A%09%09SimpleDateFormat f = new SimpleDateFormat(%22yyyy/MM/dd HH:mm:ss%22);%0A%09%09%0A%09%09// Outputs the message to the standard output steam (normally %0A%09%09// mapped to the console screen).%0A%09%09System.out.println(tag + %22: %22 + f.format(date));%0A%09%7D%0A%09%0A%09/**%0A%09 * Output an error log message.%0A%09 * @param message%0A%09 */%0A%09public static void e(String message) %7B%0A%09%09// Outputs the message to the error output steam.%0A%09%09System.err.println(message);%0A%09%7D%0A%09%0A%09/**%0A%09 * Output an error log message with the specific tag.%0A%09 * @param tag%0A%09 * @param message%0A%09 */%0A%09public static void e(String tag, String message) %7B%0A%09%09// Outputs the message to the error output steam.%0A%09%09System.err.println(tag + %22: %22 + message);%0A%09%7D%0A%7D%0A

Create Log.java