public void println(Object friend) {
        if (!datecheck()) {
            update();
        }

        String pattern = JKaiUI.getConfig().getConfigString(FriendLogPattern);
        pattern = pattern.replace("%T", now());
        if (friend instanceof ContactOnline) {
            ContactOnline friendtmp = (ContactOnline) friend;
            pattern = pattern.replace("%K", "ContactOnline");
            pattern = pattern.replace("%N", friendtmp.getUser().decode());
        }

        if (friend instanceof ContactOffline) {
            ContactOffline friendtmp = (ContactOffline) friend;
            pattern = pattern.replace("%K", "ContactOffline");
            pattern = pattern.replace("%N", friendtmp.getUser().decode());
        }

        logfilepw.println(pattern);
    }