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

    r12410 r12620  
    3535import org.openstreetmap.josm.tools.ImageProvider;
    3636import org.openstreetmap.josm.tools.ListenerList;
     37import org.openstreetmap.josm.tools.Logging;
    3738import org.openstreetmap.josm.tools.Utils;
    3839
     
    157158            String msg = "Mappaint style \""+namespace+"\" ("+ref.source.getDisplayString()+") icon \"" + ref.iconName + "\" not found.";
    158159            ref.source.logWarning(msg);
    159             Main.warn(msg);
     160            Logging.warn(msg);
    160161            return null;
    161162        }
     
    176177        ImageIcon i = getIconProvider(ref, false).setSize(width, height).get();
    177178        if (i == null) {
    178             Main.warn("Mappaint style \""+namespace+"\" ("+ref.source.getDisplayString()+") icon \"" + ref.iconName + "\" not found.");
     179            Logging.warn("Mappaint style \""+namespace+"\" ("+ref.source.getDisplayString()+") icon \"" + ref.iconName + "\" not found.");
    179180            return null;
    180181        }
     
    308309                Main.fileWatcher.registerStyleSource(source);
    309310            } catch (IOException | IllegalStateException | IllegalArgumentException e) {
    310                 Main.error(e);
    311             }
    312         }
    313         if (Main.isDebugEnabled() || !source.isValid()) {
     311                Logging.error(e);
     312            }
     313        }
     314        if (Logging.isDebugEnabled() || !source.isValid()) {
    314315            final long elapsedTime = System.currentTimeMillis() - startTime;
    315316            String message = "Initializing map style " + source.url + " completed in " + Utils.getDurationString(elapsedTime);
    316317            if (!source.isValid()) {
    317                 Main.warn(message + " (" + source.getErrors().size() + " errors, " + source.getWarnings().size() + " warnings)");
     318                Logging.warn(message + " (" + source.getErrors().size() + " errors, " + source.getWarnings().size() + " warnings)");
    318319            } else {
    319                 Main.debug(message);
     320                Logging.debug(message);
    320321            }
    321322        }
Note: See TracChangeset for help on using the changeset viewer.