Ignore:
Timestamp:
2017-08-22T22:26:32+02:00 (7 years ago)
Author:
Don-vip
Message:

see #15182 - deprecate all Main logging methods and introduce suitable replacements in Logging for most of them

File:
1 edited

Legend:

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

    r11620 r12620  
    2323import org.openstreetmap.josm.gui.preferences.SourceEntry;
    2424import org.openstreetmap.josm.tools.CheckParameterUtil;
     25import org.openstreetmap.josm.tools.Logging;
    2526
    2627/**
     
    4445            thread = new Thread((Runnable) this::processEvents, "File Watcher");
    4546        } catch (IOException e) {
    46             Main.error(e);
     47            Logging.error(e);
    4748        }
    4849    }
     
    104105     */
    105106    private void processEvents() {
    106         if (Main.isDebugEnabled()) {
    107             Main.debug("File watcher thread started");
    108         }
     107        Logging.debug("File watcher thread started");
    109108        while (true) {
    110109
     
    140139                    SourceEntry rule = ruleMap.get(fullPath);
    141140                    if (style != null) {
    142                         Main.info("Map style "+style.getDisplayString()+" has been modified. Reloading style...");
     141                        Logging.info("Map style "+style.getDisplayString()+" has been modified. Reloading style...");
    143142                        Main.worker.submit(new MapPaintStyleLoader(Collections.singleton(style)));
    144143                    } else if (rule != null) {
    145                         Main.info("Validator rule "+rule.getDisplayString()+" has been modified. Reloading rule...");
     144                        Logging.info("Validator rule "+rule.getDisplayString()+" has been modified. Reloading rule...");
    146145                        MapCSSTagChecker tagChecker = OsmValidator.getTest(MapCSSTagChecker.class);
    147146                        if (tagChecker != null) {
     
    149148                                tagChecker.addMapCSS(rule.url);
    150149                            } catch (IOException | ParseException e) {
    151                                 Main.warn(e);
     150                                Logging.warn(e);
    152151                            }
    153152                        }
    154                     } else if (Main.isDebugEnabled()) {
    155                         Main.debug("Received "+kind.name()+" event for unregistered file: "+fullPath);
     153                    } else if (Logging.isDebugEnabled()) {
     154                        Logging.debug("Received {0} event for unregistered file: {1}", kind.name(), fullPath);
    156155                    }
    157156                }
Note: See TracChangeset for help on using the changeset viewer.