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/OsmConnection.java

    r5881 r6248  
    44import static org.openstreetmap.josm.tools.I18n.tr;
    55
     6import java.net.Authenticator.RequestorType;
    67import java.net.HttpURLConnection;
    7 import java.net.Authenticator.RequestorType;
    88import java.nio.ByteBuffer;
    99import java.nio.CharBuffer;
     
    1919import org.openstreetmap.josm.gui.preferences.server.OAuthAccessTokenHolder;
    2020import org.openstreetmap.josm.io.auth.CredentialsAgentException;
     21import org.openstreetmap.josm.io.auth.CredentialsAgentResponse;
    2122import org.openstreetmap.josm.io.auth.CredentialsManager;
    22 import org.openstreetmap.josm.io.auth.CredentialsAgentResponse;
    2323import org.openstreetmap.josm.tools.Base64;
    2424
     
    132132            addOAuthAuthorizationHeader(connection);
    133133        } else {
    134             String msg = tr("Warning: unexpected value for preference ''{0}''. Got ''{1}''.", "osm-server.auth-method", authMethod);
    135             System.err.println(msg);
     134            String msg = tr("Unexpected value for preference ''{0}''. Got ''{1}''.", "osm-server.auth-method", authMethod);
     135            Main.warn(msg);
    136136            throw new OsmTransferException(msg);
    137137        }
Note: See TracChangeset for help on using the changeset viewer.