@@ -0,0 +1,1640 @@
+package pl.edu.elka.util;%0A%0Aimport java.text.SimpleDateFormat;%0Aimport java.util.Calendar;%0A%0A/**%0A * @author Gregorio%0A * Utility class. Creates beautiful log lines with an unified format. Admits different log types and subtypes (type of event,%0A * subsystem that generated the event). By default, normal events show up in the server console and get stored in the database,%0A * but it also allows you to log hidden things that only get stored in the database and%0A * are not shown in the server console. So evil.%0A */%0Apublic class Log %7B%0A%0A    public enum TYPE %7B ERROR, EVENT, WARNING %7D%0A    public enum SUBTYPE %7B ROUTING, SYSTEM, PROPERTIES, CLIENTSOCKET, ELECTION, WANTED, CRITICALSECTION %7D%0A%0A    public static void LogEvent(SUBTYPE subtype, String message)%0A    %7B%0A        String timeStamp = new SimpleDateFormat(%22yyyy-MM-dd HH:mm:ss%22).format(Calendar.getInstance().getTime());%0A        System.out.println(%22%5B%22 + timeStamp + %22%5D%22 + %22%5B%22 + TYPE.EVENT.toString() + %22%5D%5B%22 + subtype.toString() + %22%5D %22 + message);%0A%0A    %7D%0A%0A    public static void LogWarning(SUBTYPE subtype, String message)%0A    %7B%0A        String timeStamp = new SimpleDateFormat(%22yyyy-MM-dd HH:mm:ss%22).format(Calendar.getInstance().getTime());%0A        System.out.println(%22%5B%22 + timeStamp + %22%5D%22 + %22%5B%22 + TYPE.WARNING.toString() + %22%5D%5B%22 + subtype.toString() + %22%5D %22 + message);%0A    %7D%0A%0A    public static void LogError(SUBTYPE subtype, String message)%0A    %7B%0A        String timeStamp = new SimpleDateFormat(%22yyyy-MM-dd HH:mm:ss%22).format(Calendar.getInstance().getTime());%0A        System.out.println(%22%5B%22 + timeStamp + %22%5D%22 + %22%5B%22 + TYPE.ERROR.toString() + %22%5D%5B%22 + subtype.toString() + %22%5D %22 + message);%0A    %7D%0A%0A%7D%0A

Create Log.java