Changeset 5481 in josm for trunk/src/org/openstreetmap/josm/Main.java
- Timestamp:
- 2012-08-28T00:16:35+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r5460 r5481 16 16 import java.net.URI; 17 17 import java.net.URISyntaxException; 18 import java.text.MessageFormat; 18 19 import java.util.ArrayList; 19 20 import java.util.Collection; … … 151 152 public MainMenu menu; 152 153 154 /** 155 * The data validation handler. 156 */ 153 157 public OsmValidator validator; 154 158 /** … … 158 162 159 163 /** 160 * Print a message if logging is on.164 * Logging level (3 = debug, 2 = info, 1 = warn, 0 = none). 161 165 */ 162 166 static public int log_level = 2; 167 /** 168 * Print a warning message if logging is on. 169 * @param msg The message to print. 170 */ 163 171 static public void warn(String msg) { 164 172 if (log_level < 1) … … 166 174 System.out.println(msg); 167 175 } 176 /** 177 * Print an informational message if logging is on. 178 * @param msg The message to print. 179 */ 168 180 static public void info(String msg) { 169 181 if (log_level < 2) … … 171 183 System.out.println(msg); 172 184 } 185 /** 186 * Print an debug message if logging is on. 187 * @param msg The message to print. 188 */ 173 189 static public void debug(String msg) { 174 190 if (log_level < 3) 175 191 return; 176 192 System.out.println(msg); 193 } 194 /** 195 * Print a formated warning message if logging is on. Calls {@link MessageFormat#format} 196 * function to format text. 197 * @param msg The formated message to print. 198 * @param objects The objects to insert into format string. 199 */ 200 static public void warn(String msg, Object... objects) { 201 warn(MessageFormat.format(msg, objects)); 202 } 203 /** 204 * Print a formated informational message if logging is on. Calls {@link MessageFormat#format} 205 * function to format text. 206 * @param msg The formated message to print. 207 * @param objects The objects to insert into format string. 208 */ 209 static public void info(String msg, Object... objects) { 210 info(MessageFormat.format(msg, objects)); 211 } 212 /** 213 * Print a formated debug message if logging is on. Calls {@link MessageFormat#format} 214 * function to format text. 215 * @param msg The formated message to print. 216 * @param objects The objects to insert into format string. 217 */ 218 static public void debug(String msg, Object... objects) { 219 debug(MessageFormat.format(msg, objects)); 177 220 } 178 221
Note:
See TracChangeset
for help on using the changeset viewer.