log4j 2 and reworked loadSettings

* replacing all debug/info syso and all syse with log4j 2 logger
* loadSettings() should be 100% bulletproof
This commit is contained in:
Seil0 2017-09-16 18:22:46 +02:00
parent f001f18c7f
commit 60365aa09d
6 changed files with 255 additions and 122 deletions

View File

@ -0,0 +1,4 @@
.jfx-hamburgerW StackPane { -fx-background-color: white;
-fx-background-radius: 5px; }
.jfx-hamburgerB StackPane { -fx-background-color: black;
-fx-background-radius: 5px; }

12
pom.xml
View File

@ -47,6 +47,18 @@
<artifactId>sqlite-jdbc</artifactId>
<version>3.20.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.9.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.9.0</version>
</dependency>
</dependencies>
<build>

View File

@ -129,8 +129,8 @@ public class DBController {
}
//getting all entries from the streaming lists
for(int v=0; v< mainWindowController.streamingData.size(); v++){
String fileName = mainWindowController.getStreamingPath()+"/"+mainWindowController.streamingData.get(v).getStreamUrl();
for(int v=0; v< mainWindowController.getStreamingData().size(); v++){
String fileName = mainWindowController.getStreamingPath()+"/"+mainWindowController.getStreamingData().get(v).getStreamUrl();
try {
JsonObject object = Json.parse(new FileReader(fileName)).asObject();
JsonArray items = object.get("entries").asArray();
@ -181,8 +181,8 @@ public class DBController {
if(mainWindowController.getStreamingPath().equals("")||mainWindowController.getStreamingPath().equals(null)){
System.out.println("Kein Pfad angegeben"); //if path == null or ""
}else{
for(int i=0; i< mainWindowController.streamingData.size(); i++){
String fileNamea = mainWindowController.getStreamingPath()+"/"+mainWindowController.streamingData.get(i).getStreamUrl();
for(int i=0; i< mainWindowController.getStreamingData().size(); i++){
String fileNamea = mainWindowController.getStreamingPath()+"/"+mainWindowController.getStreamingData().get(i).getStreamUrl();
try {
JsonObject object = Json.parse(new FileReader(fileNamea)).asObject();
JsonArray items = object.get("entries").asArray();
@ -246,9 +246,9 @@ public class DBController {
ResultSet rs = stmt.executeQuery("SELECT * FROM film_local ORDER BY titel");
while (rs.next()) {
if(rs.getString(4).equals("favorite_black")){
mainWindowController.localFilms.add( new tableData(1, 1, 1, rs.getDouble(1), "1", rs.getString(2), rs.getString(3), new ImageView(favorite_black),rs.getBoolean(5)));
mainWindowController.getLocalFilms().add( new tableData(1, 1, 1, rs.getDouble(1), "1", rs.getString(2), rs.getString(3), new ImageView(favorite_black),rs.getBoolean(5)));
}else{
mainWindowController.localFilms.add( new tableData(1, 1, 1, rs.getDouble(1), "1", rs.getString(2), rs.getString(3), new ImageView(favorite_border_black),rs.getBoolean(5)));
mainWindowController.getLocalFilms().add( new tableData(1, 1, 1, rs.getDouble(1), "1", rs.getString(2), rs.getString(3), new ImageView(favorite_border_black),rs.getBoolean(5)));
}
}
stmt.close();
@ -258,9 +258,9 @@ public class DBController {
rs = stmt.executeQuery("SELECT * FROM film_streaming ORDER BY titel;");
while (rs.next()) {
if(rs.getString(8).equals("favorite_black")){
mainWindowController.streamingFilms.add(new tableData(rs.getInt(1), rs.getInt(2), rs.getInt(3), rs.getDouble(4), rs.getString(5), rs.getString(6), rs.getString(7), new ImageView(favorite_black),rs.getBoolean(9)));
mainWindowController.getStreamingFilms().add(new tableData(rs.getInt(1), rs.getInt(2), rs.getInt(3), rs.getDouble(4), rs.getString(5), rs.getString(6), rs.getString(7), new ImageView(favorite_black),rs.getBoolean(9)));
}else{
mainWindowController.streamingFilms.add(new tableData(rs.getInt(1), rs.getInt(2), rs.getInt(3), rs.getDouble(4), rs.getString(5), rs.getString(6), rs.getString(7), new ImageView(favorite_border_black),rs.getBoolean(9)));
mainWindowController.getStreamingFilms().add(new tableData(rs.getInt(1), rs.getInt(2), rs.getInt(3), rs.getDouble(4), rs.getString(5), rs.getString(6), rs.getString(7), new ImageView(favorite_border_black),rs.getBoolean(9)));
}
}
stmt.close();
@ -282,9 +282,9 @@ public class DBController {
stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM film_local WHERE titel = \""+name+"\";" );
if(rs.getString(4).equals("favorite_black")){
mainWindowController.localFilms.set(i, new tableData(1, 1, 1, rs.getDouble(1), "1", rs.getString(2), rs.getString(3), new ImageView(favorite_black),rs.getBoolean(5)));
mainWindowController.getLocalFilms().set(i, new tableData(1, 1, 1, rs.getDouble(1), "1", rs.getString(2), rs.getString(3), new ImageView(favorite_black),rs.getBoolean(5)));
}else{
mainWindowController.localFilms.set(i, new tableData(1, 1, 1, rs.getDouble(1), "1", rs.getString(2), rs.getString(3), new ImageView(favorite_border_black),rs.getBoolean(5)));
mainWindowController.getLocalFilms().set(i, new tableData(1, 1, 1, rs.getDouble(1), "1", rs.getString(2), rs.getString(3), new ImageView(favorite_border_black),rs.getBoolean(5)));
}
stmt.close();
rs.close();
@ -293,9 +293,9 @@ public class DBController {
stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM film_streaming WHERE titel = \""+name+"\";" );
if(rs.getString(8).equals("favorite_black")){
mainWindowController.streamingFilms.set(i,new tableData(rs.getInt(1), rs.getInt(2), rs.getInt(3), rs.getDouble(4), rs.getString(5), rs.getString(6), rs.getString(7), new ImageView(favorite_black),rs.getBoolean(9)));
mainWindowController.getStreamingFilms().set(i,new tableData(rs.getInt(1), rs.getInt(2), rs.getInt(3), rs.getDouble(4), rs.getString(5), rs.getString(6), rs.getString(7), new ImageView(favorite_black),rs.getBoolean(9)));
}else{
mainWindowController.streamingFilms.set(i,new tableData(rs.getInt(1), rs.getInt(2), rs.getInt(3), rs.getDouble(4), rs.getString(5), rs.getString(6), rs.getString(7), new ImageView(favorite_border_black),rs.getBoolean(9)));
mainWindowController.getStreamingFilms().set(i,new tableData(rs.getInt(1), rs.getInt(2), rs.getInt(3), rs.getDouble(4), rs.getString(5), rs.getString(6), rs.getString(7), new ImageView(favorite_border_black),rs.getBoolean(9)));
}
stmt.close();
rs.close();

View File

@ -27,6 +27,10 @@ import java.io.IOException;
import java.util.Locale;
import java.util.Optional;
import java.util.ResourceBundle;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
@ -56,6 +60,7 @@ public class Main extends Application {
private File posterCache;
private String dirWin = System.getProperty("user.home") + "/Documents/HomeFlix"; //Windows: C:/Users/"User"/Documents/HomeFlix
private String dirLinux = System.getProperty("user.home") + "/HomeFlix"; //Linux: /home/"User"/HomeFlix
private static Logger LOGGER;
@Override
public void start(Stage primaryStage) throws IOException {
@ -67,73 +72,77 @@ public class Main extends Application {
private void mainWindow(){
try {
FXMLLoader loader = new FXMLLoader();
loader.setLocation(ClassLoader.getSystemResource("fxml/MainWindow.fxml"));
AnchorPane pane = (AnchorPane) loader.load();
primaryStage.setMinHeight(600.00);
primaryStage.setMinWidth(900.00);
primaryStage.setResizable(false);
primaryStage.setTitle("Project HomeFlix");
primaryStage.getIcons().add(new Image(Main.class.getResourceAsStream("/icons/Homeflix_Icon_64x64.png"))); //adds application icon
mainWindowController = loader.getController(); //Link of FXMLController and controller class
mainWindowController.setAutoUpdate(AUTO_UPDATE); //set auto-update
mainWindowController.setCurrentWorkingDirectory(currentWorkingDirectory);
mainWindowController.setMain(this); //call setMain
/**Linux else Windows, check if directory & config exist
* Windows: config file: C:/Users/"User"/Documents/HomeFlix/config.xml
* directory: C:/Users/"User"/Documents/HomeFlix
* Linux: config file: /home/"User"/HomeFlix/config.xml
* directory: /home/"User"/HomeFlix
*/
if(System.getProperty("os.name").equals("Linux")) {
directory = new File(dirLinux);
settingsFile = new File(dirLinux + "/config.xml");
} else {
directory = new File(dirWin);
settingsFile = new File(dirWin + "/config.xml");
}
posterCache = new File(directory+"/posterCache");
if(!settingsFile.exists()){
directory.mkdir();
mainWindowController.setPath(firstStart());
mainWindowController.setStreamingPath(directory.getAbsolutePath());
mainWindowController.setColor(COLOR);
mainWindowController.setSize(FONT_SIZE);
mainWindowController.setAutoUpdate(AUTO_UPDATE);
mainWindowController.setLocal(local);
mainWindowController.setMode(mode);
mainWindowController.saveSettings();
Runtime.getRuntime().exec("java -jar ProjectHomeFlix.jar"); //start again (preventing Bugs)
System.exit(0); //finishes it self
}
if(!posterCache.exists()) {
posterCache.mkdir();
}
mainWindowController.loadSettings();
mainWindowController.loadStreamingSettings();
mainWindowController.initUI();
mainWindowController.initActions();
mainWindowController.initTabel();
mainWindowController.setLocalUI();
mainWindowController.applyColor(); //set theme color
mainWindowController.dbController.main(); //initialize database controller
mainWindowController.dbController.createDatabase(); //creating the database
mainWindowController.dbController.loadData(); //loading data from database to mainWindowController
mainWindowController.addDataUI();
Scene scene = new Scene(pane); //create new scene, append pane to scene
scene.getStylesheets().add(getClass().getResource("/css/MainWindow.css").toExternalForm());
primaryStage.setScene(scene); //append scene to stage
primaryStage.show(); //show stage
FXMLLoader loader = new FXMLLoader();
loader.setLocation(ClassLoader.getSystemResource("fxml/MainWindow.fxml"));
AnchorPane pane = (AnchorPane) loader.load();
primaryStage.setMinHeight(600.00);
primaryStage.setMinWidth(900.00);
primaryStage.setResizable(false);
primaryStage.setTitle("Project HomeFlix");
primaryStage.getIcons().add(new Image(Main.class.getResourceAsStream("/icons/Homeflix_Icon_64x64.png"))); //adds application icon
mainWindowController = loader.getController(); //Link of FXMLController and controller class
mainWindowController.setAutoUpdate(AUTO_UPDATE); //set auto-update
mainWindowController.setCurrentWorkingDirectory(currentWorkingDirectory);
mainWindowController.setMain(this); //call setMain
/**Linux else Windows, check if directory & config exist
* Windows: config file: C:/Users/"User"/Documents/HomeFlix/config.xml
* directory: C:/Users/"User"/Documents/HomeFlix
* Linux: config file: /home/"User"/HomeFlix/config.xml
* directory: /home/"User"/HomeFlix
*/
if(System.getProperty("os.name").equals("Linux")) {
directory = new File(dirLinux);
settingsFile = new File(dirLinux + "/config.xml");
} else {
directory = new File(dirWin);
settingsFile = new File(dirWin + "/config.xml");
}
posterCache = new File(directory+"/posterCache");
if(!settingsFile.exists()){
directory.mkdir();
mainWindowController.setPath(firstStart());
mainWindowController.setStreamingPath(directory.getAbsolutePath());
mainWindowController.setColor(COLOR);
mainWindowController.setSize(FONT_SIZE);
mainWindowController.setAutoUpdate(AUTO_UPDATE);
mainWindowController.setLocal(local);
mainWindowController.setMode(mode);
mainWindowController.saveSettings();
try {
Runtime.getRuntime().exec("java -jar ProjectHomeFlix.jar"); //start again (preventing Bugs)
System.exit(0); //finishes it self
} catch (Exception e) {
LOGGER.error("error while restarting HomeFlix", e);
}
}
if(!posterCache.exists()) {
posterCache.mkdir();
}
mainWindowController.loadSettings();
mainWindowController.loadStreamingSettings();
mainWindowController.initUI();
mainWindowController.initActions();
mainWindowController.initTabel();
mainWindowController.setLocalUI();
mainWindowController.applyColor(); //set theme color
mainWindowController.dbController.main(); //initialize database controller
mainWindowController.dbController.createDatabase(); //creating the database
mainWindowController.dbController.loadData(); //loading data from database to mainWindowController
mainWindowController.addDataUI();
Scene scene = new Scene(pane); //create new scene, append pane to scene
scene.getStylesheets().add(getClass().getResource("/css/MainWindow.css").toExternalForm());
primaryStage.setScene(scene); //append scene to stage
primaryStage.show(); //show stage
} catch (IOException e) {
e.printStackTrace();
LOGGER.error("", e);
}
}
@ -168,6 +177,16 @@ public class Main extends Application {
}
public static void main(String[] args) {
if(System.getProperty("os.name").equals("Linux")){
System.setProperty("logFilename", System.getProperty("user.home") + "/HomeFlix/app.log");
File logFile = new File(System.getProperty("user.home") + "/HomeFlix/app.log");
logFile.delete();
}else{
System.setProperty("logFilename", System.getProperty("user.home") + "/Documents/HomeFlix/app.log");
File logFile = new File(System.getProperty("user.home") + "/Documents/HomeFlix/app.log");
logFile.delete();
}
LOGGER = LogManager.getLogger(Main.class.getName());
launch(args);
}

View File

@ -40,6 +40,10 @@ import java.util.ArrayList;
import java.util.Locale;
import java.util.Properties;
import java.util.ResourceBundle;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import com.jfoenix.controls.JFXButton;
import com.jfoenix.controls.JFXColorPicker;
import com.jfoenix.controls.JFXHamburger;
@ -191,7 +195,8 @@ public class MainWindowController {
private boolean streamingSettingsTrue = false;
private boolean autoUpdate = false;
static boolean firststart = false;
private int hashA = -2055934614;
private static final Logger LOGGER = LogManager.getLogger(MainWindowController.class.getName());
private int hashA = -647380320;
private String version = "0.5.2";
private String buildNumber = "129";
private String versionName = "solidify cow";
@ -217,7 +222,6 @@ public class MainWindowController {
private String name;
private String datPath;
private String mode;
@SuppressWarnings("unused")
private String ratingSortType;
private String local;
String title;
@ -246,9 +250,9 @@ public class MainWindowController {
private ObservableList<tableData> filterData = FXCollections.observableArrayList();
private ObservableList<String> locals = FXCollections.observableArrayList("English (en_US)", "Deutsch (de_DE)");
ObservableList<tableData> localFilms = FXCollections.observableArrayList();
ObservableList<tableData> streamingFilms = FXCollections.observableArrayList();
ObservableList<tableData> streamingData = FXCollections.observableArrayList();
private ObservableList<tableData> localFilms = FXCollections.observableArrayList();
private ObservableList<tableData> streamingFilms = FXCollections.observableArrayList();
private ObservableList<tableData> streamingData = FXCollections.observableArrayList();
private ImageView skip_previous_white = new ImageView(new Image("icons/ic_skip_previous_white_18dp_1x.png"));
private ImageView skip_previous_black = new ImageView(new Image("icons/ic_skip_previous_black_18dp_1x.png"));
private ImageView skip_next_white = new ImageView(new Image("icons/ic_skip_next_white_18dp_1x.png"));
@ -279,11 +283,11 @@ public class MainWindowController {
}
}).start();
} else {
System.out.println("Desktop not supported");
LOGGER.info("Desktop not supported");
}
}else if (mode.equals("local")) {
if(System.getProperty("os.name").contains("Linux")){
System.out.println("This is "+System.getProperty("os.name"));
LOGGER.info("This is "+System.getProperty("os.name"));
String line;
String output = "";
Process p;
@ -437,8 +441,7 @@ public class MainWindowController {
Runtime.getRuntime().exec("java -jar ProjectHomeFlix.jar"); //start again
System.exit(0); //finishes itself
} catch (IOException e) {
System.out.println("es ist ein Fehler aufgetreten");
e.printStackTrace();
LOGGER.error("error while restarting HomeFlix", e);
}
}
}
@ -475,7 +478,7 @@ public class MainWindowController {
private void streamingDirectoryBtnAction(){
selectedStreamingFolder = directoryChooser.showDialog(null);
if(selectedStreamingFolder == null){
System.out.println("No Directory selected");
LOGGER.warn("No Directory selected");
}else{
setStreamingPath(selectedStreamingFolder.getAbsolutePath());
saveSettings();
@ -484,8 +487,7 @@ public class MainWindowController {
Runtime.getRuntime().exec("java -jar ProjectHomeFlix.jar"); //start again
System.exit(0); //finishes itself
} catch (IOException e) {
System.out.println("es ist ein Fehler aufgetreten");
e.printStackTrace();
LOGGER.error("error while restarting HomeFlix", e);
}
}
}
@ -548,7 +550,7 @@ public class MainWindowController {
if(mode.equals("local")){
if(localFilms.get(selected).getCached()==true){
System.out.println("loading from cache: "+name);
LOGGER.info("loading from cache: "+name);
dbController.readCache(datPath);
}else{
ApiQuery.startQuery(name,datPath); // start api query
@ -556,7 +558,7 @@ public class MainWindowController {
}else{
System.out.println(streamingFilms.size());
if(streamingFilms.get(selected).getCached()==true){
System.out.println("loading from cache: "+name);
LOGGER.info("loading from cache: "+name);
dbController.readCache(datPath);
}else{
ApiQuery.startQuery(name,datPath); // start api query
@ -628,7 +630,7 @@ public class MainWindowController {
for(int i = 0; i < filterData.size(); i++){
root.getChildren().add(new TreeItem<tableData>(filterData.get(i))); //add filtered data to root node after search
}
if(tfsearch.getText().hashCode() == hashA){
if(tfsearch.getText().hashCode()== hashA){
setColor("000000");
applyColor();
}
@ -672,11 +674,7 @@ public class MainWindowController {
try {
dbController.refresh(name, selected);
} catch (SQLException e) {
Alert alert = new Alert(AlertType.ERROR);
alert.setTitle("Error");
alert.setHeaderText("");
alert.setContentText("There should be an error message in future (like-problem).\nIt seems as a cat has stolen the \"like-methode\"!");
e.printStackTrace();
LOGGER.error("(like-problem), it seems as a cat has stolen the \"like-methode\"!", e);
}
refreshTable();
}
@ -710,7 +708,7 @@ public class MainWindowController {
columnRating.sortTypeProperty().addListener(new ChangeListener<SortType>() {
@Override
public void changed(ObservableValue<? extends SortType> paramObservableValue, SortType paramT1, SortType paramT2) {
System.out.println("NAME Clicked -- sortType = " + paramT1 + ", SortType=" + paramT2);
LOGGER.info("NAME Clicked -- sortType = " + paramT1 + ", SortType=" + paramT2);
ArrayList<Integer> fav_true = new ArrayList<Integer>();
ArrayList<Integer> fav_false = new ArrayList<Integer>();
ObservableList<tableData> helpData;
@ -733,7 +731,7 @@ public class MainWindowController {
}
}
if(paramT2.toString().equals("DESCENDING")){
System.out.println("Absteigend");
LOGGER.info("Absteigend"); //Debug, delete?
for(int i = 0;i<fav_true.size();i++){
filterData.add(helpData.get(fav_true.get(i)));
}
@ -749,7 +747,7 @@ public class MainWindowController {
}
}
System.out.println(filterData.size());
LOGGER.info(filterData.size()); //Debug, delete?
for(int i = 0; i < filterData.size(); i++){
// System.out.println(filterData.get(i).getTitel()+"; "+filterData.get(i).getRating());
root.getChildren().add(new TreeItem<tableData>(filterData.get(i))); //add filtered data to root node after search
@ -760,7 +758,7 @@ public class MainWindowController {
//initialize UI elements
void initUI(){
System.out.println("Mode: "+mode); //TODO debugging
LOGGER.info("Mode: "+mode); //TODO debugging
debugBtn.setDisable(true); //debugging button for tests
debugBtn.setVisible(false);
@ -1037,7 +1035,7 @@ public class MainWindowController {
//saves the Settings
public void saveSettings(){
System.out.println("saving settings ...");
LOGGER.info("saving settings ...");
OutputStream outputStream; //new output-stream
try {
props.setProperty("path", getPath()); //writes path into property
@ -1065,7 +1063,7 @@ public class MainWindowController {
//loads the Settings
public void loadSettings(){
System.out.println("loading settings ...");
LOGGER.info("loading settings ...");
InputStream inputStream;
try {
if(System.getProperty("os.name").equals("Linux")){
@ -1074,31 +1072,79 @@ public class MainWindowController {
inputStream = new FileInputStream(fileWin);
}
props.loadFromXML(inputStream); //new input-stream from .xml
path = props.getProperty("path"); //read path from property
streamingPath = props.getProperty("streamingPath");
color = props.getProperty("color");
size = Double.parseDouble(props.getProperty("size"));
autoUpdate = Boolean.parseBoolean(props.getProperty("autoUpdate"));
local = props.getProperty("local");
ratingSortType = props.getProperty("ratingSortType");
switch (props.getProperty("mode")) {
case "local":
mode = "local";
break;
case "streaming":
mode = "streaming";
break;
default:
mode = "local";
break;
try {
setPath(props.getProperty("path")); //read path from property
} catch (Exception e) {
LOGGER.error("cloud not load path", e);
setPath("");
}
try {
setStreamingPath(props.getProperty("streamingPath"));
} catch (Exception e) {
LOGGER.error("cloud not load streamingPath", e);
setStreamingPath("");
}
try {
setColor(props.getProperty("color"));
} catch (Exception e) {
LOGGER.error("cloud not load color", e);
setColor("");
}
try {
setSize( Double.parseDouble(props.getProperty("size")));
} catch (Exception e) {
LOGGER.error("cloud not load fontsize", e);
setSize(17.0);
}
try {
setAutoUpdate(Boolean.parseBoolean(props.getProperty("autoUpdate")));
} catch (Exception e) {
LOGGER.error("cloud not load autoUpdate", e);
setAutoUpdate(false);
}
try {
setLocal(props.getProperty("local"));
} catch (Exception e) {
LOGGER.error("cloud not load local", e);
setLocal(System.getProperty("user.language")+"_"+System.getProperty("user.country"));
}
try {
setRatingSortType(props.getProperty("ratingSortType"));
} catch (Exception e) {
LOGGER.error("cloud not load autoUpdate", e);
setRatingSortType("");
}
try {
switch (props.getProperty("mode")) {
case "local":
setMode("local");
break;
case "streaming":
setMode("streaming");
break;
default:
setMode("local");
break;
}
} catch (Exception e) {
setMode("local");
LOGGER.error("cloud not load mode", e);
}
inputStream.close();
} catch (IOException e) {
if(firststart == false){
LOGGER.error("faild to load settings", e);
showErrorMsg(errorSave, e);
e.printStackTrace();
}
// showErrorMsg(errorLoad, e); //TODO This should not be visible at first startup
}
@ -1176,4 +1222,36 @@ public class MainWindowController {
public void setCurrentWorkingDirectory(String currentWorkingDirectory) {
this.currentWorkingDirectory = currentWorkingDirectory;
}
public ObservableList<tableData> getLocalFilms() {
return localFilms;
}
public void setLocalFilms(ObservableList<tableData> localFilms) {
this.localFilms = localFilms;
}
public ObservableList<tableData> getStreamingFilms() {
return streamingFilms;
}
public void setStreamingFilms(ObservableList<tableData> streamingFilms) {
this.streamingFilms = streamingFilms;
}
public ObservableList<tableData> getStreamingData() {
return streamingData;
}
public void setStreamingData(ObservableList<tableData> streamingData) {
this.streamingData = streamingData;
}
public String getRatingSortType() {
return ratingSortType;
}
public void setRatingSortType(String ratingSortType) {
this.ratingSortType = ratingSortType;
}
}

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="INFO">
<Appenders>
<Console name="console" target="SYSTEM_OUT">
<PatternLayout pattern="[%-5level] %d{yyyy-MM-dd HH:mm:ss} [%t] %c{1} - %msg%n" />
</Console>
<File name="file" fileName="${sys:logFilename}" immediateFlush="true">
<PatternLayout pattern="[%-5level] %d{yyyy-MM-dd HH:mm:ss} [%t] %c{1} - %msg%n" />
</File>
</Appenders>
<Loggers>
<Root level="debug" additivity="false">
<AppenderRef ref="console" />
<AppenderRef ref="file"/>
</Root>
</Loggers>
</Configuration>