public static void logRaw(String message, int level) {
        if (LOG_EXACT) {
            if (level == LOG_LEVEL.getLevel()) {
                if(MainWindow.txtPnLog == null) {
                    System.out.println(message);
                }else {
                    MainWindow.txtPnLog.setText(MainWindow.txtPnLog.getText() + "\n" + message);
                }
            }
        } else if (LOG_LEVEL.getLevel() >= level) {
            System.out.println(MainWindow.txtPnLog == null);
            if(MainWindow.txtPnLog == null) {
                System.out.println(message);
            }else {
                MainWindow.txtPnLog.setText(MainWindow.txtPnLog.getText() + "\n" + message);
            }
        }
    }