1 package twcsckernel.serverKernel.io; 2 3 /*** 4 * Interfejs writera logów. 5 * 6 * @author VMD Group 7 * 8 */ 9 public interface LogWriter { 10 11 public static final int USER_LOGIN = 0; 12 13 public static final int USER_REMOTE_LOGOUT = 1; 14 15 public static final int USER_KICK_LOGOUT = 2; 16 17 public static final int ERROR_UNEXPECTED_EXCEPTION = 0; 18 19 public static final int ERROR_LOGIN_PASSWORD = 1; 20 21 public static final int ERROR_PLUGIN_LOADING = 2; 22 23 public static final int ERROR_OTHER = 3; 24 25 /*** 26 * Zapisuje wiadomość do logu o logowaniu/wylogowaniu. 27 * 28 * @param message - 29 * wiaodmość 30 * @param type - 31 * typ wiadomości:<br/> 32 * <ul> 33 * <li>{@link #USER_LOGIN USER_LOGIN} - pomyślne logowanie</li> 34 * <li>{@link #USER_REMOTE_LOGOUT USER_REMOTE_LOGOUT} - pomyślne 35 * wylogowanie zainicjowane zdalnie</li> 36 * <li>{@link #USER_KICK_LOGOUT USER_KICK_LOGOUT} - pomyślne 37 * wylogowanie zainicjowane lokalnie przez 38 * {@link twcsckernel.serverKernel.usr.UserGarbageCollector user garbage collector} 39 * lub plugin administracyjny</li> 40 * </ul> 41 */ 42 public void writeUserLog(String message, int type); 43 44 /*** 45 * Zapisuje wiadomość do logu o błędach. 46 * @param message - wiadomość 47 * @param type 48 */ 49 public void writeErrorLog(String message, int type); 50 51 public void writeInfoLog(String message); 52 53 }