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/actions/AbstractInfoAction.java

    r6084 r6248  
    4343        String ret =  pattern.matcher(baseUrl).replaceAll("/browse");
    4444        if (ret.equals(baseUrl)) {
    45             System.out.println(tr("WARNING: unexpected format of API base URL. Redirection to info or history page for OSM object will probably fail. API base URL is: ''{0}''",baseUrl));
     45            Main.warn(tr("Unexpected format of API base URL. Redirection to info or history page for OSM object will probably fail. API base URL is: ''{0}''",baseUrl));
    4646        }
    4747        if (ret.startsWith("http://api.openstreetmap.org/")) {
     
    6262        String ret =  pattern.matcher(baseUrl).replaceAll("/user");
    6363        if (ret.equals(baseUrl)) {
    64             System.out.println(tr("WARNING: unexpected format of API base URL. Redirection to user page for OSM user will probably fail. API base URL is: ''{0}''",baseUrl));
     64            Main.warn(tr("Unexpected format of API base URL. Redirection to user page for OSM user will probably fail. API base URL is: ''{0}''",baseUrl));
    6565        }
    6666        if (ret.startsWith("http://api.openstreetmap.org/")) {
Note: See TracChangeset for help on using the changeset viewer.