Changeset 4190 in josm


Ignore:
Timestamp:
Jul 1, 2011 9:32:08 AM (2 years ago)
Author:
stoecker
Message:

add more output function in main, we should use these instead of System.out.println()

File:
1 edited

Legend:

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

    r4126 r4190  
    152152 
    153153    /** 
    154      * Print a debug message if debugging is on. 
    155      */ 
    156     static public int debug_level = 1; 
     154     * Print a message if logging is on. 
     155     */ 
     156    static public int log_level = 2; 
     157    static public void warn(String msg) { 
     158        if (log_level < 1) 
     159            return; 
     160        System.out.println(msg); 
     161    } 
     162    static public void info(String msg) { 
     163        if (log_level < 2) 
     164            return; 
     165        System.out.println(msg); 
     166    } 
    157167    static public void debug(String msg) { 
    158         if (debug_level <= 0) 
     168        if (log_level < 3) 
    159169            return; 
    160170        System.out.println(msg); 
     
    441451                if(!Main.pref.get("gui.geometry").equals(geometry)) { 
    442452                    // remember this geometry 
    443                     // Main.debug("Main window: saving geometry \"" + geometry + "\""); 
    444453                    Main.pref.put("gui.geometry", geometry); 
    445454                } 
     
    451460            bounds = !args.containsKey("no-maximize") ? new Rectangle(0,0,screenDimension.width,screenDimension.height) : new Rectangle(1000,740); 
    452461        } 
    453         // Main.debug("window geometry: "+bounds); 
    454462    } 
    455463 
Note: See TracChangeset for help on using the changeset viewer.