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)
Location:
trunk/src/org/openstreetmap/josm/command
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/command/ConflictAddCommand.java

    r5077 r6248  
    4949    @Override public void undoCommand() {
    5050        if (! Main.map.mapView.hasLayer(getLayer())) {
    51             System.out.println(tr("Warning: Layer ''{0}'' does not exist any more. Cannot remove conflict for object ''{1}''.",
     51            Main.warn(tr("Layer ''{0}'' does not exist any more. Cannot remove conflict for object ''{1}''.",
    5252                    getLayer().getName(),
    5353                    conflict.getMy().getDisplayName(DefaultNameFormatter.getInstance())
  • trunk/src/org/openstreetmap/josm/command/ConflictResolveCommand.java

    r5816 r6248  
    6161
    6262        if (! Main.map.mapView.hasLayer(getLayer())) {
    63             System.out.println(tr("Cannot undo command ''{0}'' because layer ''{1}'' is not present any more",
     63            Main.warn(tr("Cannot undo command ''{0}'' because layer ''{1}'' is not present any more",
    6464                    this.toString(),
    6565                    getLayer().toString()
  • trunk/src/org/openstreetmap/josm/command/RelationMemberConflictResolverCommand.java

    r5881 r6248  
    8181    public void undoCommand() {
    8282        if (! Main.map.mapView.hasLayer(layer)) {
    83             System.out.println(tr("Cannot undo command ''{0}'' because layer ''{1}'' is not present any more",
     83            Main.warn(tr("Cannot undo command ''{0}'' because layer ''{1}'' is not present any more",
    8484                    this.toString(),
    8585                    layer.toString()
  • trunk/src/org/openstreetmap/josm/command/WayNodesConflictResolverCommand.java

    r5903 r6248  
    99import javax.swing.Icon;
    1010
     11import org.openstreetmap.josm.Main;
    1112import org.openstreetmap.josm.data.conflict.Conflict;
    1213import org.openstreetmap.josm.data.osm.Node;
     
    5455        super.executeCommand();
    5556
    56         // replace the list of nodes of 'my' way by the list of merged
    57         // nodes
     57        // replace the list of nodes of 'my' way by the list of merged nodes
    5858        //
    5959        for (Node n:mergedNodeList) {
    6060            if (! getLayer().data.getNodes().contains(n)) {
    61                 System.out.println(tr("Main dataset does not include node {0}", n.toString()));
     61                Main.warn(tr("Main dataset does not include node {0}", n.toString()));
    6262            }
    6363        }
Note: See TracChangeset for help on using the changeset viewer.