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/mappaint/MapPaintStyles.java

    r6174 r6248  
    100100                .setHeight(height)
    101101                .setOptional(true).get();
    102         if(i == null)
    103         {
    104             System.out.println("Mappaint style \""+namespace+"\" ("+ref.source.getDisplayString()+") icon \"" + ref.iconName + "\" not found.");
     102        if (i == null) {
     103            Main.warn("Mappaint style \""+namespace+"\" ("+ref.source.getDisplayString()+") icon \"" + ref.iconName + "\" not found.");
    105104            return null;
    106105        }
     
    243242                    }
    244243                }
    245                 System.err.println("Warning: Could not detect style type. Using default (xml).");
     244                Main.warn("Could not detect style type. Using default (xml).");
    246245                return new XmlStyleSource(entry);
    247246            }
    248247        } catch (IOException e) {
    249             System.err.println(tr("Warning: failed to load Mappaint styles from ''{0}''. Exception was: {1}", entry.url, e.toString()));
     248            Main.warn(tr("Failed to load Mappaint styles from ''{0}''. Exception was: {1}", entry.url, e.toString()));
    250249            e.printStackTrace();
    251250        } finally {
Note: See TracChangeset for help on using the changeset viewer.