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/gui/preferences/server/BasicAuthenticationPreferencesPanel.java

    r5886 r6248  
    1515import javax.swing.JPanel;
    1616
     17import org.openstreetmap.josm.Main;
    1718import org.openstreetmap.josm.gui.widgets.JosmPasswordField;
    1819import org.openstreetmap.josm.gui.widgets.JosmTextField;
     
    103104        } catch(CredentialsAgentException e) {
    104105            e.printStackTrace();
    105             System.err.println(tr("Warning: failed to retrieve OSM credentials from credential manager."));
    106             System.err.println(tr("Current credential manager is of type ''{0}''", cm.getClass().getName()));
     106            Main.warn(tr("Failed to retrieve OSM credentials from credential manager."));
     107            Main.warn(tr("Current credential manager is of type ''{0}''", cm.getClass().getName()));
    107108            tfOsmUserName.setText("");
    108109            tfOsmPassword.setText("");
     
    118119            );
    119120            cm.store(RequestorType.SERVER, OsmApi.getOsmApi().getHost(), pa);
    120         } catch(CredentialsAgentException e) {
     121        } catch (CredentialsAgentException e) {
    121122            e.printStackTrace();
    122             System.err.println(tr("Warning: failed to save OSM credentials to credential manager."));
    123             System.err.println(tr("Current credential manager is of type ''{0}''", cm.getClass().getName()));
     123            Main.warn(tr("Failed to save OSM credentials to credential manager."));
     124            Main.warn(tr("Current credential manager is of type ''{0}''", cm.getClass().getName()));
    124125        }
    125126    }
Note: See TracChangeset for help on using the changeset viewer.