Ignore:
Timestamp:
2015-12-22T18:51:36+01:00 (9 years ago)
Author:
simon04
Message:

JOSM/wikipedia: use Main for logging

Location:
applications/editors/josm/plugins/wikipedia/src/org/wikipedia
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaApp.java

    r31847 r31848  
    4747            final String url = "https://tools.wmflabs.org/wp-world/marks.php?"
    4848                    + "bbox=" + bbox + "&LANG=" + wikipediaLang;
    49             System.out.println("Wikipedia: GET " + url);
     49            Main.info("Wikipedia: GET " + url);
    5050            // parse XML document
    5151            final XPathExpression xpathPlacemark = XPathFactory.newInstance().newXPath().compile("//Placemark");
     
    8181                    + "&depth=" + depth
    8282                    + "&cat=" + encodeURL(category);
    83             System.out.println("Wikipedia: GET " + url);
     83            Main.info("Wikipedia: GET " + url);
    8484            try (final InputStream in = Utils.openURL(new URL(url));
    8585                 final Scanner scanner = new Scanner(in, "UTF-8").useDelimiter("\n")) {
     
    116116            final String url = "https://tools.wmflabs.org/wiwosm/osmjson/getGeoJSON.php?action=check"
    117117                    + "&lang=" + wikipediaLang;
    118             System.out.println("Wikipedia: POST " + url + " " + articleNames);
     118            Main.info("Wikipedia: POST " + url + " " + articleNames);
    119119
    120120            try {
     
    175175                    "&lllimit=500" +
    176176                    "&format=xml";
    177             System.out.println("Wikipedia: GET " + url);
     177            Main.info("Wikipedia: GET " + url);
    178178            try (final InputStream in = Utils.openURL(new URL(url))) {
    179179                final Document xml = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(in);
     
    270270            final WikipediaLangArticle wp = WikipediaLangArticle.parseFromUrl(getHrefFromDescription(description));
    271271            if (wp == null) {
    272                 System.err.println("Could not extract Wikipedia tag from: " + getHrefFromDescription(description));
     272                Main.warn("Could not extract Wikipedia tag from: " + getHrefFromDescription(description));
    273273            }
    274274            this.wikipediaLang = wp == null ? null : wp.lang;
     
    291291                return m.group(1);
    292292            } else {
    293                 System.err.println("Could not parse URL from: " + description);
     293                Main.warn("Could not parse URL from: " + description);
    294294                return null;
    295295            }
     
    305305                        + "&lang=" + wikipediaLang
    306306                        + "&article=" + encodeURL(wikipediaArticle);
    307                 System.out.println("Wikipedia: GET " + url);
     307                Main.info("Wikipedia: GET " + url);
    308308                try (final InputStream in = Utils.openURL(new URL(url));
    309309                     final Scanner scanner = new Scanner(in, "UTF-8")) {
  • applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaToggleDialog.java

    r31114 r31848  
    228228            if (list.getSelectedValue() != null) {
    229229                final String url = ((WikipediaEntry) list.getSelectedValue()).getBrowserUrl();
    230                 System.out.println("Wikipedia: opening " + url);
     230                Main.info("Wikipedia: opening " + url);
    231231                OpenBrowser.displayUrl(url);
    232232            }
Note: See TracChangeset for help on using the changeset viewer.