diff --git a/log4j2.xml b/log4j2.xml
deleted file mode 100644
index 93db801..0000000
--- a/log4j2.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pom.xml b/pom.xml
index ffb3cea..d18d848 100644
--- a/pom.xml
+++ b/pom.xml
@@ -90,17 +90,6 @@
1.7
- process-classes
-
-
-
-
-
-
- run
-
-
-
remove-episode
process-sources
@@ -191,16 +180,6 @@
2.2.2
compile
-
- org.apache.logging.log4j
- log4j-api
- 2.5
-
-
- org.apache.logging.log4j
- log4j-core
- 2.5
-
diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/EpnTapMainApp.java b/src/main/java/eu/omp/irap/vespa/epntapclient/EpnTapMainApp.java
index 2fc220e..4504b54 100644
--- a/src/main/java/eu/omp/irap/vespa/epntapclient/EpnTapMainApp.java
+++ b/src/main/java/eu/omp/irap/vespa/epntapclient/EpnTapMainApp.java
@@ -16,12 +16,11 @@
package eu.omp.irap.vespa.epntapclient;
+import java.util.logging.Logger;
+
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
import eu.omp.irap.vespa.epntapclient.controller.EpnTapController;
/**
@@ -30,9 +29,8 @@ import eu.omp.irap.vespa.epntapclient.controller.EpnTapController;
* @author N. Jourdane
*/
public class EpnTapMainApp {
-
- /** The logger for this class. */
- private static final Logger logger = LogManager.getRootLogger();
+ /** The logger for the class EpnTapMainApp. */
+ private static final Logger logger = Logger.getLogger(EpnTapMainApp.class.getName());
/** Constructor to hide the implicit public one. */
private EpnTapMainApp() {
diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/controller/EpnTapController.java b/src/main/java/eu/omp/irap/vespa/epntapclient/controller/EpnTapController.java
index e791014..6c442ef 100644
--- a/src/main/java/eu/omp/irap/vespa/epntapclient/controller/EpnTapController.java
+++ b/src/main/java/eu/omp/irap/vespa/epntapclient/controller/EpnTapController.java
@@ -16,8 +16,7 @@
package eu.omp.irap.vespa.epntapclient.controller;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
+import java.util.logging.Logger;
import eu.omp.irap.vespa.epntapclient.utils.Const;
import eu.omp.irap.vespa.epntapclient.utils.Queries;
@@ -30,8 +29,8 @@ import eu.omp.irap.vespa.epntapclient.votable.view.VOTableView;
* @author N. Jourdane
*/
public class EpnTapController {
- /** The logger for this class. */
- private static final Logger logger = LogManager.getLogger(EpnTapController.class);
+ /** The logger for the class EpnTapController. */
+ Logger logger = Logger.getLogger(EpnTapController.class.getName());
/** The view of EPN-TAP application. */
EpnTapMainView view;
@@ -52,8 +51,6 @@ public class EpnTapController {
* Method constructor
*/
public EpnTapController() {
-
- // TODO: Get only *EPN* TAP services
servicesController = new VOTableController(Const.DEFAULT_REGISTRY_URL, "ADQL",
Queries.GET_EPN_TAP_SERVICES);
diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/utils/Log.java b/src/main/java/eu/omp/irap/vespa/epntapclient/utils/Log.java
deleted file mode 100644
index de248d2..0000000
--- a/src/main/java/eu/omp/irap/vespa/epntapclient/utils/Log.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * This file is a part of EpnTAPClient.
- * This program aims to provide EPN-TAP support for software clients, like CASSIS spectrum analyzer.
- * See draft specifications: https://voparis-confluence.obspm.fr/pages/viewpage.action?pageId=559861
- * Copyright (C) 2016 Institut de Recherche en Astrophysique et Planétologie.
- *
- * This program is free software: you can
- * redistribute it and/or modify it under the terms of the GNU General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or (at your option) any later
- * version. This program is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details. You should have received a copy of
- * the GNU General Public License along with this program. If not, see
- * .
- */
-
-package eu.omp.irap.vespa.epntapclient.utils;
-
-import java.io.FileWriter;
-import java.io.IOException;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
-
-import eu.omp.irap.vespa.epntapclient.EpnTapMainApp;
-
-/**
- * Simple class to provide logging features
- *
- * @author N. Jourdane
- */
-public class Log {
- /** The logger for this class. */
- private static final Logger logger = LogManager.getLogger(EpnTapMainApp.class);
-
- /** Constructor to hide the implicit public one. */
- private Log() {
- }
-
- /**
- * Print the specified object in JSON format in a file on the temp directory. The default file
- * name is "object.json"
- *
- * @param obj the object to print in a file.
- * @return The path of the file.
- */
- public static String printObject(Object obj) {
- return printObject("object", obj);
- }
-
- /**
- * Print the specified object in JSON format in a file on the temp directory.
- *
- * @param title The name of the file.
- * @param obj the object to print in a file.
- * @return The path of the file.
- */
- public static String printObject(String title, Object obj) {
- Gson gson = new GsonBuilder().setPrettyPrinting().create();
- String json = gson.toJson(obj);
- String path = Const.TMP_DIR + "/" + title + ".json";
- try (FileWriter writer = new FileWriter(path)) {
- writer.write(json);
-
- } catch (IOException e) {
- logger.error("Can not print in the file " + path, e);
- }
-
- return path;
- }
-
-}
diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/utils/Queries.java b/src/main/java/eu/omp/irap/vespa/epntapclient/utils/Queries.java
index 5b28e91..dc4473c 100644
--- a/src/main/java/eu/omp/irap/vespa/epntapclient/utils/Queries.java
+++ b/src/main/java/eu/omp/irap/vespa/epntapclient/utils/Queries.java
@@ -19,6 +19,7 @@ package eu.omp.irap.vespa.epntapclient.utils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
+import java.util.logging.Logger;
import eu.omp.irap.vespa.epntapclient.votable.Utils.StringJoiner;
@@ -26,6 +27,8 @@ import eu.omp.irap.vespa.epntapclient.votable.Utils.StringJoiner;
* @author N. Jourdane
*/
public final class Queries {
+ /** The logger for the class Queries. */
+ Logger logger = Logger.getLogger(Queries.class.getName());
// AMDA access_url: http://cdpp-epntap.cesr.fr/__system__/tap/run/tap
// AMDA table name: amdadb.epn_core
diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/view/EpnTapMainView.java b/src/main/java/eu/omp/irap/vespa/epntapclient/view/EpnTapMainView.java
index 9a4ff2a..f0b88d6 100644
--- a/src/main/java/eu/omp/irap/vespa/epntapclient/view/EpnTapMainView.java
+++ b/src/main/java/eu/omp/irap/vespa/epntapclient/view/EpnTapMainView.java
@@ -18,6 +18,7 @@ package eu.omp.irap.vespa.epntapclient.view;
import java.awt.BorderLayout;
import java.awt.Dimension;
+import java.util.logging.Logger;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
@@ -25,9 +26,6 @@ import javax.swing.JSplitPane;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
import eu.omp.irap.vespa.epntapclient.controller.EpnTapController;
import eu.omp.irap.vespa.epntapclient.votable.view.VOTableView;
@@ -35,9 +33,8 @@ import eu.omp.irap.vespa.epntapclient.votable.view.VOTableView;
* @author N. Jourdane
*/
public class EpnTapMainView extends JPanel {
-
- /** The logger for this class. */
- static final Logger logger = LogManager.getLogger(EpnTapMainView.class);
+ /** The logger for the class EpnTapMainView. */
+ private static final Logger logger = Logger.getLogger(EpnTapMainView.class.getName());
/** The serial version UID (affected with a random number). */
private static final long serialVersionUID = -1233290271099283814L;
diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/view/ParamField.java b/src/main/java/eu/omp/irap/vespa/epntapclient/view/ParamField.java
index 29c4eb9..b6f7b53 100644
--- a/src/main/java/eu/omp/irap/vespa/epntapclient/view/ParamField.java
+++ b/src/main/java/eu/omp/irap/vespa/epntapclient/view/ParamField.java
@@ -11,6 +11,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
+import java.util.logging.Logger;
import javax.swing.BoxLayout;
import javax.swing.JComboBox;
@@ -21,9 +22,6 @@ import javax.swing.SwingUtilities;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
@@ -33,9 +31,8 @@ import eu.omp.irap.vespa.epntapclient.votable.controller.VOTableException.BadReq
import eu.omp.irap.vespa.epntapclient.votable.controller.VOTableException.HTTPRequestException;
public abstract class ParamField extends JPanel {
-
- /** The logger for this class. */
- private static final Logger logger = LogManager.getLogger(ParamField.class);
+ /** The logger for the class ParamField. */
+ private static final Logger logger = Logger.getLogger(ParamField.class.getName());
private static final int MIN_FIELD_WIDTH = 30;
private static final int FIELD_HEIGHT = 20;
@@ -204,7 +201,7 @@ public abstract class ParamField extends JPanel {
try {
resolverResult = VOTableConnection.sendGet(RESOLVER_URL, "q=\"" + begining + "\"");
} catch (HTTPRequestException | BadRequestException e) {
- logger.fatal("Can not send sersolver query: ", e);
+ logger.severe("Can not send sersolver query: " + e);
}
JsonObject root = new JsonParser().parse(resolverResult.toString()).getAsJsonObject();
int count = Integer.parseInt(root.get("count").toString());
diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/view/RequestView.java b/src/main/java/eu/omp/irap/vespa/epntapclient/view/RequestView.java
index c2bf7e1..61a99b1 100644
--- a/src/main/java/eu/omp/irap/vespa/epntapclient/view/RequestView.java
+++ b/src/main/java/eu/omp/irap/vespa/epntapclient/view/RequestView.java
@@ -24,6 +24,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.logging.Logger;
import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
@@ -31,9 +32,6 @@ import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JTextArea;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
import eu.omp.irap.vespa.epntapclient.utils.Queries;
import eu.omp.irap.vespa.epntapclient.view.ParamField.DataProductTypeField;
import eu.omp.irap.vespa.epntapclient.view.ParamField.DateRangeField;
@@ -45,9 +43,8 @@ import eu.omp.irap.vespa.epntapclient.votable.controller.VOTableException;
* @author N. Jourdane
*/
public class RequestView extends JPanel implements ActionListener {
-
- /** The logger for this class. */
- private static final Logger logger = LogManager.getLogger(RequestView.class);
+ /** The logger for the class RequestView. */
+ private static final Logger logger = Logger.getLogger(RequestView.class.getName());
/** The serial version UID (affected with a random number). */
private static final long serialVersionUID = 1262856496809315405L;
@@ -169,7 +166,7 @@ public class RequestView extends JPanel implements ActionListener {
try {
mainView.getController().sendQuery(queryArea.getText());
} catch (VOTableException e) {
- logger.error("Can not send query when clicking on the send button.", e);
+ logger.warning("Can not send query when clicking on the send button." + e);
}
}
}
diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/votable/Utils.java b/src/main/java/eu/omp/irap/vespa/epntapclient/votable/Utils.java
index aa7e4a4..8a96cdc 100644
--- a/src/main/java/eu/omp/irap/vespa/epntapclient/votable/Utils.java
+++ b/src/main/java/eu/omp/irap/vespa/epntapclient/votable/Utils.java
@@ -16,13 +16,24 @@
package eu.omp.irap.vespa.epntapclient.votable;
+import java.io.FileWriter;
+import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
+import java.util.logging.Logger;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+
+import eu.omp.irap.vespa.epntapclient.utils.Const;
/**
* @author N. Jourdane
*/
public class Utils {
+ /** The logger for the class Utils. */
+ private static final Logger logger = Logger.getLogger(Utils.class.getName());
+
public static class StringJoiner {
String separator;
List list;
@@ -47,4 +58,27 @@ public class Utils {
return string;
}
}
+
+ /**
+ * Print the specified object in JSON format in a file on the temp directory.
+ *
+ * @param title The name of the file.
+ * @param obj the object to print in a file.
+ * @return The path of the file.
+ */
+ public static String printObject(String title, Object obj) {
+ Gson gson = new GsonBuilder().setPrettyPrinting().create();
+ String json = gson.toJson(obj);
+ String path = Const.TMP_DIR + "/" + title + ".json";
+ try (FileWriter writer = new FileWriter(path)) {
+ writer.write(json);
+
+ } catch (IOException e) {
+ logger.warning("Can not print in the file " + path + e);
+ }
+ logger.info("A json file representing " + title + " (" + obj.getClass().getName()
+ + ") has been created on " + path);
+
+ return path;
+ }
}
diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/votable/VOTableApp.java b/src/main/java/eu/omp/irap/vespa/epntapclient/votable/VOTableApp.java
index 4e06cc7..5fa7a60 100644
--- a/src/main/java/eu/omp/irap/vespa/epntapclient/votable/VOTableApp.java
+++ b/src/main/java/eu/omp/irap/vespa/epntapclient/votable/VOTableApp.java
@@ -16,12 +16,11 @@
package eu.omp.irap.vespa.epntapclient.votable;
+import java.util.logging.Logger;
+
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
import com.google.gson.Gson;
import eu.omp.irap.vespa.epntapclient.votable.controller.VOTableController;
@@ -32,9 +31,8 @@ import eu.omp.irap.vespa.epntapclient.votable.controller.VOTableController;
* @author N. Jourdane
*/
public class VOTableApp {
-
- /** The logger for this class. */
- static final Logger logger = LogManager.getLogger(VOTableApp.class);
+ /** The logger for the class VOTableApp. */
+ private static final Logger logger = Logger.getLogger(VOTableApp.class.getName());
/**
* Main function to start the application as standalone.
diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/votable/controller/VOTableConnection.java b/src/main/java/eu/omp/irap/vespa/epntapclient/votable/controller/VOTableConnection.java
index 0baffe7..6700b8f 100644
--- a/src/main/java/eu/omp/irap/vespa/epntapclient/votable/controller/VOTableConnection.java
+++ b/src/main/java/eu/omp/irap/vespa/epntapclient/votable/controller/VOTableConnection.java
@@ -28,9 +28,7 @@ import java.net.URL;
import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.util.Date;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
+import java.util.logging.Logger;
import eu.omp.irap.vespa.epntapclient.utils.Const;
import eu.omp.irap.vespa.epntapclient.votable.controller.VOTableException.BadRequestException;
@@ -42,9 +40,8 @@ import eu.omp.irap.vespa.epntapclient.votable.controller.VOTableException.HTTPRe
* @author N. Jourdane
*/
public final class VOTableConnection {
-
- /** The logger for this class. */
- private static final Logger logger = LogManager.getLogger(VOTableConnection.class);
+ /** The logger for the class VOTableConnection. */
+ private static final Logger logger = Logger.getLogger(VOTableConnection.class.getName());
/** The user agent used for the requests. */
private static final String USER_AGENT = "Mozilla/5.0";
diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/votable/controller/VOTableController.java b/src/main/java/eu/omp/irap/vespa/epntapclient/votable/controller/VOTableController.java
index ffebde6..71a50da 100644
--- a/src/main/java/eu/omp/irap/vespa/epntapclient/votable/controller/VOTableController.java
+++ b/src/main/java/eu/omp/irap/vespa/epntapclient/votable/controller/VOTableController.java
@@ -17,9 +17,7 @@
package eu.omp.irap.vespa.epntapclient.votable.controller;
import java.io.IOException;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
+import java.util.logging.Logger;
import eu.omp.irap.vespa.epntapclient.votable.controller.VOTableException.VOTableParsingException;
import eu.omp.irap.vespa.epntapclient.votable.model.Table;
@@ -30,9 +28,8 @@ import eu.omp.irap.vespa.epntapclient.votable.view.VOTableView;
* @author N. Jourdane
*/
public class VOTableController {
-
- /** The logger for this class. */
- private static final Logger logger = LogManager.getLogger(VOTableController.class);
+ /** The logger for the class VOTableController. */
+ private static final Logger logger = Logger.getLogger(VOTableController.class.getName());
/** The view of the VOTable */
VOTableView view;
diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/votable/controller/VOTableDataParser.java b/src/main/java/eu/omp/irap/vespa/epntapclient/votable/controller/VOTableDataParser.java
index a1e7596..3ddea7c 100644
--- a/src/main/java/eu/omp/irap/vespa/epntapclient/votable/controller/VOTableDataParser.java
+++ b/src/main/java/eu/omp/irap/vespa/epntapclient/votable/controller/VOTableDataParser.java
@@ -22,15 +22,13 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.logging.Logger;
import javax.xml.bind.DatatypeConverter;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
import com.google.gson.Gson;
-import eu.omp.irap.vespa.epntapclient.utils.Log;
+import eu.omp.irap.vespa.epntapclient.votable.Utils;
import eu.omp.irap.vespa.epntapclient.votable.model.DataType;
import eu.omp.irap.vespa.epntapclient.votable.model.Field;
import eu.omp.irap.vespa.epntapclient.votable.model.Stream;
@@ -41,9 +39,8 @@ import eu.omp.irap.vespa.epntapclient.votable.model.TableData;
* @author N. Jourdane
*/
public class VOTableDataParser {
-
- /** The logger for this class. */
- private static final Logger logger = LogManager.getLogger(VOTableDataParser.class);
+ /** The logger for the class VOTableDataParser. */
+ private static final Logger logger = Logger.getLogger(VOTableDataParser.class.getName());
/**
* A list of arrays, representing data stored in the VOTable. Each element is a VOTable row,
@@ -95,8 +92,7 @@ public class VOTableDataParser {
parseFITSStream(table.getDATA().getFITS().getSTREAM(), fields);
}
- String logPath = Log.printObject(data);
- logger.info("A json file representing the VOTable data has been created on " + logPath);
+ String logPath = Utils.printObject("voTableData", data);
}
/**
@@ -256,7 +252,7 @@ public class VOTableDataParser {
} else if (dataType.equals(DataType.DOUBLE)) {
row[nColumn] = stream.getDouble();
} else {
- logger.warn("Data type " + dataType + " is not supprted.");
+ logger.warning("Data type " + dataType + " is not supported.");
}
// logger.debug(columnsName[nColumn] + ": " + row[nColumn])
diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/votable/controller/VOTableException.java b/src/main/java/eu/omp/irap/vespa/epntapclient/votable/controller/VOTableException.java
index 528fade..99eb441 100644
--- a/src/main/java/eu/omp/irap/vespa/epntapclient/votable/controller/VOTableException.java
+++ b/src/main/java/eu/omp/irap/vespa/epntapclient/votable/controller/VOTableException.java
@@ -16,8 +16,7 @@
package eu.omp.irap.vespa.epntapclient.votable.controller;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
+import java.util.logging.Logger;
/**
* VOTable Exception class.
@@ -26,42 +25,41 @@ import org.apache.logging.log4j.Logger;
*/
@SuppressWarnings({ "javadoc", "serial" })
public class VOTableException extends Exception {
-
- /** The logger for this class. */
- static final Logger logger = LogManager.getLogger(VOTableException.class);
+ /** The logger for the class VOTableException. */
+ private static final Logger logger = Logger.getLogger(VOTableException.class.getName());
/** The log message displayed when errors appends. */
private static final String ERROR_MSG = "-- error --\n%1s\nbecause:\n%2s\n-- end of error --\n";
public VOTableException() {
- logger.error("A VOTable error occured.");
+ logger.warning("A VOTable error occured.");
}
public VOTableException(String message) {
- logger.error(message);
+ logger.warning(message);
}
public VOTableException(String message, Exception e) {
- logger.error(String.format(ERROR_MSG, message, e.getMessage()));
+ logger.warning(String.format(ERROR_MSG, message, e.getMessage()));
}
public VOTableException(Exception e) {
- logger.error(e.getMessage());
+ logger.warning(e.getMessage());
}
public static class HTTPRequestException extends VOTableException {
public HTTPRequestException(String message) {
- logger.error(message);
+ logger.warning(message);
}
public HTTPRequestException(String message, Exception e) {
- logger.error(String.format(ERROR_MSG, message, e.getMessage()));
+ logger.warning(String.format(ERROR_MSG, message, e.getMessage()));
}
}
public static class VOTableParsingException extends VOTableException {
public VOTableParsingException(String message, Exception e) {
- logger.error(String.format(ERROR_MSG, message, e.getMessage()));
+ logger.warning(String.format(ERROR_MSG, message, e.getMessage()));
}
}
@@ -71,7 +69,7 @@ public class VOTableException extends Exception {
public BadRequestException(String message, String info) {
super(message);
this.info = info;
- logger.error(message + "\nDetails: " + info);
+ logger.warning(message + "\nDetails: " + info);
}
public String getInfo() {
diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/votable/controller/VOTableParser.java b/src/main/java/eu/omp/irap/vespa/epntapclient/votable/controller/VOTableParser.java
index be46356..0ae3d3d 100644
--- a/src/main/java/eu/omp/irap/vespa/epntapclient/votable/controller/VOTableParser.java
+++ b/src/main/java/eu/omp/irap/vespa/epntapclient/votable/controller/VOTableParser.java
@@ -18,6 +18,7 @@ package eu.omp.irap.vespa.epntapclient.votable.controller;
import java.io.File;
import java.io.IOException;
+import java.util.logging.Logger;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
@@ -31,8 +32,6 @@ import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.xml.sax.SAXException;
@@ -44,9 +43,8 @@ import eu.omp.irap.vespa.epntapclient.votable.model.VOTABLE;
* @author N. Jourdane
*/
public final class VOTableParser {
-
- /** The logger for this class. */
- static final Logger logger = LogManager.getLogger(VOTableParser.class);
+ /** The logger for the class VOTableParser. */
+ private static final Logger logger = Logger.getLogger(VOTableParser.class.getName());
/** The path of the VOTable to verify the VOTable XML file. */
private static final String VOTABLE_SHEMA = "http://www.ivoa.net/xml/VOTable/v";
diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/votable/view/VOTableView.java b/src/main/java/eu/omp/irap/vespa/epntapclient/votable/view/VOTableView.java
index 629f193..79be658 100644
--- a/src/main/java/eu/omp/irap/vespa/epntapclient/votable/view/VOTableView.java
+++ b/src/main/java/eu/omp/irap/vespa/epntapclient/votable/view/VOTableView.java
@@ -18,6 +18,7 @@ package eu.omp.irap.vespa.epntapclient.votable.view;
import java.awt.BorderLayout;
import java.util.List;
+import java.util.logging.Logger;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
@@ -28,18 +29,14 @@ import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
import javax.swing.table.DefaultTableModel;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
/**
* The main class of the View of the application.
*
* @author N. Jourdane
*/
public class VOTableView extends JPanel implements TableModelListener {
-
- /** The logger for this class. */
- static final Logger logger = LogManager.getLogger(VOTableView.class);
+ /** The logger for the class VOTableView. */
+ private static final Logger logger = Logger.getLogger(VOTableView.class.getName());
// TODO: Create classes VOTableGUI and VOTableCLI which implements an interface VOTableView
/** The serial version UID (affected with a random number). */
@@ -110,7 +107,7 @@ public class VOTableView extends JPanel implements TableModelListener {
*/
public void displayError(String message) {
JOptionPane.showMessageDialog(this, message, "Error", JOptionPane.ERROR_MESSAGE);
- logger.warn(message);
+ logger.warning(message);
}
/**
@@ -122,7 +119,7 @@ public class VOTableView extends JPanel implements TableModelListener {
public void displayError(String message, Exception e) {
String error_msg = "-- user error --\n%1s\nbecause:\n%2s\n-- end of user error --\n";
JOptionPane.showMessageDialog(this, message, "Error", JOptionPane.ERROR_MESSAGE);
- logger.warn(String.format(error_msg, message, e.getMessage()));
+ logger.warning(String.format(error_msg, message, e.getMessage()));
}
@Override
--
libgit2 0.21.2