Ignore:
Timestamp:
2013-09-23T16:47:50+02:00 (11 years ago)
Author:
Don-vip
Message:

Rework console output:

  • new log level "error"
  • Replace nearly all calls to system.out and system.err to Main.(error|warn|info|debug)
  • Remove some unnecessary debug output
  • Some messages are modified (removal of "Info", "Warning", "Error" from the message itself -> notable i18n impact but limited to console error messages not seen by the majority of users, so that's ok)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java

    r6070 r6248  
    4949 *    reader.parseOsm();
    5050 *    if (!reader.getMissingPrimitives().isEmpty()) {
    51  *        System.out.println("There are missing primitives: " + reader.getMissingPrimitives());
     51 *        Main.info("There are missing primitives: " + reader.getMissingPrimitives());
    5252 *    }
    5353 *    if (!reader.getSkippedWays().isEmpty()) {
    54  *       System.out.println("There are skipped ways: " + reader.getMissingPrimitives());
     54 *       Main.info("There are skipped ways: " + reader.getMissingPrimitives());
    5555 *    }
    5656 * </pre>
     
    489489            } catch (OsmApiException e) {
    490490                if (e.getResponseCode() == HttpURLConnection.HTTP_NOT_FOUND) {
    491                     System.out.println(tr("Server replied with response code 404, retrying with an individual request for each object."));
     491                    Main.info(tr("Server replied with response code 404, retrying with an individual request for each object."));
    492492                    return singleGetIdPackage(type, pkg, progressMonitor);
    493493                } else {
     
    567567                } catch (OsmApiException e) {
    568568                    if (e.getResponseCode() == HttpURLConnection.HTTP_NOT_FOUND) {
    569                         System.out.println(tr("Server replied with response code 404 for id {0}. Skipping.", Long.toString(id)));
     569                        Main.info(tr("Server replied with response code 404 for id {0}. Skipping.", Long.toString(id)));
    570570                        result.missingPrimitives.add(new SimplePrimitiveId(id, type));
    571571                    } else {
Note: See TracChangeset for help on using the changeset viewer.