Commit 2641f1a0 authored by Stefan Schuhbaeck's avatar Stefan Schuhbaeck
Browse files

remove dependency to log4j. Add Logging Facade

parent 83475864
package org.vadere.gui.projectview.control;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.vadere.gui.components.utils.Messages;
import org.vadere.gui.projectview.model.ProjectViewModel;
import org.vadere.gui.projectview.view.VTable;
import org.vadere.util.io.IOUtils;
import org.vadere.util.logging.Logger;
import javax.swing.*;
import java.awt.event.ActionEvent;
import javax.swing.*;
public class ActionDeleteScenarios extends AbstractAction {
private static Logger logger = LogManager.getLogger(ActionDeleteScenarios.class);
private static Logger logger = Logger.getLogger(ActionDeleteScenarios.class);
private ProjectViewModel model;
private final VTable scenarioTable;
......
package org.vadere.gui.projectview.control;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.vadere.gui.components.utils.Messages;
import org.vadere.gui.projectview.model.ProjectViewModel;
import org.vadere.gui.projectview.view.ProjectView;
import org.vadere.simulator.projects.Scenario;
import org.vadere.util.logging.Logger;
import java.awt.*;
import java.awt.event.ActionEvent;
......@@ -15,7 +15,7 @@ import javax.swing.*;
public class ActionEditScenarioDescription extends AbstractAction {
private static Logger logger = LogManager.getLogger(ActionEditScenarioDescription.class);
private static Logger logger = Logger.getLogger(ActionEditScenarioDescription.class);
private ProjectViewModel model;
......
package org.vadere.gui.projectview.control;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.vadere.gui.components.utils.Messages;
import org.vadere.gui.projectview.model.ProjectViewModel;
import org.vadere.simulator.projects.Scenario;
import org.vadere.simulator.projects.io.IOVadere;
import org.vadere.util.io.IOUtils;
import org.vadere.util.logging.Logger;
import javax.swing.filechooser.FileFilter;
import javax.swing.filechooser.FileNameExtensionFilter;
import java.awt.event.ActionEvent;
import java.io.IOException;
import javax.swing.filechooser.FileFilter;
import javax.swing.filechooser.FileNameExtensionFilter;
/**
* Ask the user to select a scenario-file from an output directory to convert this file to a
* {@link org.vadere.simulator.projects.Scenario} scenario.
......@@ -21,7 +22,7 @@ import java.io.IOException;
public class ActionGenerateScenarioFromOutputFile extends ActionAbstractAddScenario {
private static final long serialVersionUID = 1L;
private static Logger logger = LogManager.getLogger(ActionGenerateScenarioFromOutputFile.class);
private static Logger logger = Logger.getLogger(ActionGenerateScenarioFromOutputFile.class);
private ProjectViewModel model;
......
package org.vadere.gui.projectview.control;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.vadere.gui.projectview.model.ProjectViewModel;
import org.vadere.util.logging.Logger;
import javax.swing.*;
import java.awt.event.ActionEvent;
import javax.swing.*;
public class ActionInterruptScenarios extends AbstractAction {
private static Logger logger = LogManager.getLogger(ActionInterruptScenarios.class);
private static Logger logger = Logger.getLogger(ActionInterruptScenarios.class);
private ProjectViewModel model;
......
package org.vadere.gui.projectview.control;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.vadere.gui.components.utils.Messages;
import org.vadere.gui.projectview.VadereApplication;
import org.vadere.gui.projectview.model.ProjectViewModel;
......@@ -10,21 +9,22 @@ import org.vadere.gui.projectview.view.VDialogManager;
import org.vadere.simulator.entrypoints.Version;
import org.vadere.simulator.projects.VadereProject;
import org.vadere.simulator.projects.io.IOVadere;
import org.vadere.simulator.projects.migration.MigrationAssistant;
import org.vadere.simulator.projects.migration.MigrationOptions;
import org.vadere.simulator.projects.migration.MigrationResult;
import org.vadere.util.logging.Logger;
import javax.swing.*;
import java.awt.event.ActionEvent;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.prefs.Preferences;
import javax.swing.*;
public class ActionLoadProject extends AbstractAction {
private static final long serialVersionUID = 1L;
private static Logger logger = LogManager.getLogger(ActionLoadProject.class);
private static Logger logger = Logger.getLogger(ActionLoadProject.class);
private ProjectViewModel model;
......
package org.vadere.gui.projectview.control;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.vadere.gui.projectview.model.ProjectViewModel;
import org.vadere.gui.projectview.view.ProjectView;
import org.vadere.util.logging.Logger;
import javax.swing.*;
import java.awt.event.ActionEvent;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import javax.swing.*;
public class ActionLoadRecentProject extends AbstractAction {
private static final long serialVersionUID = 1L;
private static Logger logger = LogManager.getLogger(ActionLoadProject.class);
private static Logger logger = Logger.getLogger(ActionLoadProject.class);
private ProjectViewModel model;
private String path;
......
package org.vadere.gui.projectview.control;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.vadere.gui.projectview.model.ProjectViewModel;
import org.vadere.gui.projectview.model.VadereScenarioTableModel;
import org.vadere.gui.projectview.model.VadereState;
import org.vadere.simulator.projects.Scenario;
import org.vadere.util.logging.Logger;
import javax.swing.*;
import java.awt.event.ActionEvent;
import javax.swing.*;
public class ActionPauseScenario extends AbstractAction {
private static Logger logger = LogManager.getLogger(ActionPauseScenario.class);
private static Logger logger = Logger.getLogger(ActionPauseScenario.class);
private ProjectViewModel model;
......
package org.vadere.gui.projectview.control;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.vadere.gui.components.utils.Messages;
import org.vadere.gui.projectview.model.ProjectViewModel;
import org.vadere.gui.projectview.model.ProjectViewModel.OutputBundle;
import org.vadere.simulator.projects.io.IOOutput;
import org.vadere.util.io.IOUtils;
import org.vadere.util.logging.Logger;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.io.File;
import java.io.IOException;
import javax.swing.*;
public class ActionRenameOutputFile extends AbstractAction {
private static final long serialVersionUID = 1L;
private static Logger logger = LogManager.getLogger(ActionRenameOutputFile.class);
private static Logger logger = Logger.getLogger(ActionRenameOutputFile.class);
private ProjectViewModel model;
......
package org.vadere.gui.projectview.control;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.vadere.gui.components.utils.Messages;
import org.vadere.gui.projectview.model.ProjectViewModel;
import org.vadere.util.io.IOUtils;
import org.vadere.util.logging.Logger;
import javax.swing.*;
import java.awt.event.ActionEvent;
import javax.swing.*;
public class ActionRenameProject extends AbstractAction {
private static Logger logger = LogManager.getLogger(ActionRenameProject.class);
private static Logger logger = Logger.getLogger(ActionRenameProject.class);
private ProjectViewModel model;
......
package org.vadere.gui.projectview.control;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.vadere.gui.components.utils.Messages;
import org.vadere.gui.projectview.model.ProjectViewModel;
import org.vadere.gui.projectview.model.VadereScenarioTableModel;
import org.vadere.gui.projectview.model.VadereState;
import org.vadere.simulator.projects.Scenario;
import org.vadere.simulator.projects.ProjectWriter;
import org.vadere.simulator.projects.Scenario;
import org.vadere.util.logging.Logger;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.io.IOException;
import javax.swing.*;
public class ActionRenameScenario extends AbstractAction {
private static Logger logger = LogManager.getLogger(ActionRenameScenario.class);
private static Logger logger = Logger.getLogger(ActionRenameScenario.class);
private ProjectViewModel model;
......
package org.vadere.gui.projectview.control;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.vadere.gui.projectview.model.ProjectViewModel;
import org.vadere.gui.projectview.model.ProjectViewModel.OutputBundle;
import org.vadere.simulator.control.OfflineSimulation;
import org.vadere.simulator.projects.Scenario;
import org.vadere.simulator.projects.io.IOOutput;
import org.vadere.util.logging.Logger;
import java.awt.event.ActionEvent;
import java.io.IOException;
......@@ -17,7 +17,7 @@ public class ActionRunOutput extends AbstractAction {
private static final long serialVersionUID = 1L;
private static Logger logger = LogManager.getLogger(ActionRunOutput.class);
private static Logger logger = Logger.getLogger(ActionRunOutput.class);
private ProjectViewModel model;
......
package org.vadere.gui.projectview.control;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.vadere.gui.projectview.model.ProjectViewModel;
import org.vadere.gui.projectview.view.VDialogManager;
import org.vadere.util.logging.Logger;
import java.awt.event.ActionEvent;
import java.io.IOException;
......@@ -11,7 +11,7 @@ import java.io.IOException;
public class ActionSaveAsProject extends ActionAbstractSaveProject {
private static final long serialVersionUID = 1L;
private static Logger logger = LogManager.getLogger(ActionSaveAsProject.class);
private static Logger logger = Logger.getLogger(ActionSaveAsProject.class);
public ActionSaveAsProject(final String name, final ProjectViewModel model) {
super(name, model);
......
package org.vadere.gui.projectview.control;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.vadere.gui.projectview.model.ProjectViewModel;
import org.vadere.gui.projectview.view.VDialogManager;
import org.vadere.util.logging.Logger;
import java.awt.event.ActionEvent;
import java.io.IOException;
......@@ -11,7 +11,7 @@ import java.io.IOException;
public class ActionSaveProject extends ActionAbstractSaveProject {
private static final long serialVersionUID = 1L;
private static Logger logger = LogManager.getLogger(ActionSaveProject.class);
private static Logger logger = Logger.getLogger(ActionSaveProject.class);
public ActionSaveProject(final String name, final ProjectViewModel model) {
super(name, model);
......
package org.vadere.gui.projectview.control;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.vadere.gui.components.utils.Messages;
import org.vadere.gui.projectview.model.ProjectViewModel;
import org.vadere.gui.projectview.view.ProjectView;
import org.vadere.gui.projectview.view.VDialogManager;
import org.vadere.gui.projectview.view.VTable;
import org.vadere.util.logging.Logger;
import javax.swing.*;
import java.awt.event.ActionEvent;
import javax.swing.*;
public class ActionSeeDiscardChanges extends AbstractAction {
private static Logger logger = LogManager.getLogger(ActionSeeDiscardChanges.class);
private static Logger logger = Logger.getLogger(ActionSeeDiscardChanges.class);
private final ProjectViewModel model;
private final VTable scenarioTable;
......
package org.vadere.gui.projectview.model;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.vadere.gui.components.utils.Messages;
import org.vadere.gui.projectview.VadereApplication;
import org.vadere.gui.projectview.control.IOutputFileRefreshListener;
......@@ -12,22 +11,28 @@ import org.vadere.gui.projectview.view.ScenarioPanel;
import org.vadere.gui.projectview.view.VDialogManager;
import org.vadere.gui.projectview.view.VTable;
import org.vadere.gui.topographycreator.model.IDrawPanelModel;
import org.vadere.simulator.projects.ProjectWriter;
import org.vadere.simulator.projects.Scenario;
import org.vadere.simulator.projects.VadereProject;
import org.vadere.simulator.projects.ProjectWriter;
import org.vadere.simulator.projects.io.IOOutput;
import org.vadere.util.logging.Logger;
import javax.swing.*;
import java.io.File;
import java.io.IOException;
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.prefs.Preferences;
import java.util.stream.Collectors;
import javax.swing.*;
public class ProjectViewModel implements IScenarioChecker {
private static Logger logger = LogManager.getLogger(ProjectViewModel.class);
private static Logger logger = Logger.getLogger(ProjectViewModel.class);
private VadereProject project;
private Scenario currentScenario;
......
package org.vadere.gui.projectview.model;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.vadere.gui.components.utils.Messages;
import org.vadere.simulator.projects.Scenario;
import org.vadere.simulator.projects.VadereProject;
import org.vadere.util.logging.Logger;
/**
* The table panelModel used in the table that displays
......@@ -38,7 +38,7 @@ public class VadereScenarioTableModel extends VadereTableModelSorted<VadereScena
}
}
private static Logger logger = LogManager.getLogger(VadereScenarioTableModel.class);
private static Logger logger = Logger.getLogger(VadereScenarioTableModel.class);
private static final long serialVersionUID = 1145206652000839654L;
VadereScenarioTableModel() {
......
package org.vadere.gui.projectview.utils;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.vadere.gui.components.utils.Resources;
import org.vadere.gui.projectview.VadereApplication;
import org.vadere.gui.projectview.control.ActionLoadProject;
import org.vadere.simulator.projects.VadereProject;
import org.vadere.simulator.projects.ProjectWriter;
import org.vadere.simulator.projects.VadereProject;
import org.vadere.util.io.IOUtils;
import org.vadere.util.logging.Logger;
import java.io.IOException;
import java.util.prefs.BackingStoreException;
......@@ -15,7 +15,7 @@ import java.util.prefs.Preferences;
public class ApplicationWriter {
private static Logger logger = LogManager.getLogger(ApplicationWriter.class);
private static Logger logger = Logger.getLogger(ApplicationWriter.class);
public static void saveProject(final String filePath, final VadereProject project, final boolean override)
throws IOException {
......
package org.vadere.gui.projectview.utils;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.vadere.simulator.models.MainModel;
import org.vadere.simulator.models.Model;
import org.vadere.simulator.projects.dataprocessing.datakey.DataKey;
......@@ -10,25 +8,31 @@ import org.vadere.simulator.projects.dataprocessing.datakey.OutputFileMap;
import org.vadere.simulator.projects.dataprocessing.outputfile.OutputFile;
import org.vadere.simulator.projects.dataprocessing.processor.DataProcessor;
import org.vadere.state.attributes.Attributes;
import org.vadere.state.attributes.models.AttributesBHM;
import org.vadere.state.attributes.models.AttributesOSM;
import org.vadere.util.logging.Logger;
import java.io.*;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.Modifier;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.net.JarURLConnection;
import java.net.URL;
import java.util.*;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.TreeMap;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.stream.Collector;
import java.util.stream.Collectors;
@Deprecated
public class ClassFinder {
private static Logger log = LogManager.getLogger(ClassFinder.class);
private static Logger log = Logger.getLogger(ClassFinder.class);
public static List<String> getAttributesNames() {
// OSM ok for determining package name? use Object.class as tag instead?
......
......@@ -5,8 +5,6 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
import info.clearthought.layout.TableLayout;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea;
import org.fife.ui.rsyntaxtextarea.SyntaxConstants;
import org.fife.ui.rsyntaxtextarea.Theme;
......@@ -24,6 +22,7 @@ import org.vadere.simulator.projects.dataprocessing.store.DataProcessorStore;
import org.vadere.simulator.projects.dataprocessing.store.OutputFileStore;
import org.vadere.state.util.StateJsonConverter;
import org.vadere.util.io.IOUtils;
import org.vadere.util.logging.Logger;
import java.awt.*;
import java.awt.event.ActionEvent;
......@@ -53,7 +52,7 @@ import javax.swing.table.DefaultTableModel;
class DataProcessingView extends JPanel implements IJsonView {
private static Logger logger = LogManager.getLogger(DataProcessingView.class);
private static Logger logger = Logger.getLogger(DataProcessingView.class);
private IJsonView activeJsonView; // gui-mode or expert-mode
private JLabel switchJsonViewModeLabel = new JLabel();
......
package org.vadere.gui.projectview.view;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea;
import org.fife.ui.rsyntaxtextarea.SyntaxConstants;
import org.fife.ui.rsyntaxtextarea.Theme;
import org.vadere.gui.components.utils.Messages;
import org.vadere.gui.components.utils.Resources;
import org.vadere.util.logging.Logger;
import javax.swing.*;
import javax.swing.event.DocumentListener;
import java.awt.*;
import java.io.IOException;
import java.io.InputStream;
import javax.swing.*;
import javax.swing.event.DocumentListener;
public class JSONView extends JPanel {
private static final long serialVersionUID = -5147644809515076284L;
private static Logger logger = LogManager.getLogger(JSONView.class);
private static Logger logger = Logger.getLogger(JSONView.class);
private JTextArea txtrTextfiletextarea;
private JLabel lbljsonvalid;
private JLabel lbljsoninvalid;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment