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/data/imagery/ImageryLayerInfo.java

    r11707 r12620  
    2424import org.openstreetmap.josm.io.OnlineResource;
    2525import org.openstreetmap.josm.io.imagery.ImageryReader;
     26import org.openstreetmap.josm.tools.Logging;
    2627import org.openstreetmap.josm.tools.Utils;
    2728import org.xml.sax.SAXException;
     
    8283                    add(i);
    8384                } catch (IllegalArgumentException e) {
    84                     Main.warn("Unable to load imagery preference entry:"+e);
     85                    Logging.warn("Unable to load imagery preference entry:"+e);
    8586                }
    8687            }
     
    150151                OnlineResource.JOSM_WEBSITE.checkOfflineAccess(source, Main.getJOSMWebsite());
    151152            } catch (OfflineAccessException e) {
    152                 Main.warn(e, false);
     153                Logging.log(Logging.LEVEL_WARN, e);
    153154                online = false;
    154155            }
     
    163164            } catch (IOException ex) {
    164165                loadError = true;
    165                 Main.error(ex, false);
     166                Logging.log(Logging.LEVEL_ERROR, ex);
    166167            } catch (SAXException ex) {
    167168                loadError = true;
    168                 Main.error(ex);
     169                Logging.error(ex);
    169170            }
    170171        }
     
    205206                if (idMap.containsKey(i.getId())) {
    206207                    notUnique.add(i.getId());
    207                     Main.error("Id ''{0}'' is not unique - used by ''{1}'' and ''{2}''!",
     208                    Logging.error("Id ''{0}'' is not unique - used by ''{1}'' and ''{2}''!",
    208209                            i.getId(), i.getName(), idMap.get(i.getId()).getName());
    209210                    continue;
     
    256257                        }
    257258                    } else {
    258                         Main.error("Default imagery ''{0}'' has no id. Skipping.", def.getName());
     259                        Logging.error("Default imagery ''{0}'' has no id. Skipping.", def.getName());
    259260                    }
    260261                }
     
    279280            if (matchingDefault != null && !matchingDefault.equalsPref(info)) {
    280281                layers.set(i, matchingDefault);
    281                 Main.info(tr("Update imagery ''{0}''", info.getName()));
     282                Logging.info(tr("Update imagery ''{0}''", info.getName()));
    282283                changed = true;
    283284            }
     
    300301                remove(info.getValue());
    301302                drop.add(info.getKey());
    302                 Main.info(tr("Drop old imagery ''{0}''", info.getValue().getName()));
     303                Logging.info(tr("Drop old imagery ''{0}''", info.getValue().getName()));
    303304            }
    304305        }
Note: See TracChangeset for help on using the changeset viewer.