Ignore:
Timestamp:
2017-08-22T22:26:32+02:00 (8 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/validation/OsmValidator.java

    r12542 r12620  
    6161import org.openstreetmap.josm.gui.preferences.projection.ProjectionPreference;
    6262import org.openstreetmap.josm.gui.preferences.validator.ValidatorPreference;
     63import org.openstreetmap.josm.tools.Logging;
    6364import org.openstreetmap.josm.tools.Utils;
    6465
     
    143144            allTestsMap.put(testClass.getName(), testClass.getConstructor().newInstance());
    144145        } catch (ReflectiveOperationException e) {
    145             Main.error(e);
     146            Logging.error(e);
    146147        }
    147148    }
     
    189190                    ignoredErrors.addAll(Files.readAllLines(path, StandardCharsets.UTF_8));
    190191                } catch (final FileNotFoundException e) {
    191                     Main.debug(Main.getErrorMessage(e));
     192                    Logging.debug(Logging.getErrorMessage(e));
    192193                } catch (final IOException e) {
    193                     Main.error(e);
     194                    Logging.error(e);
    194195                }
    195196            }
     
    225226            }
    226227        } catch (IOException e) {
    227             Main.error(e);
     228            Logging.error(e);
    228229        }
    229230    }
     
    355356    public static synchronized void initializeTests() {
    356357        if (!testsInitialized) {
    357             Main.debug("Initializing validator tests");
     358            Logging.debug("Initializing validator tests");
    358359            final long startTime = System.currentTimeMillis();
    359360            initializeTests(getTests());
    360361            testsInitialized = true;
    361             if (Main.isDebugEnabled()) {
     362            if (Logging.isDebugEnabled()) {
    362363                final long elapsedTime = System.currentTimeMillis() - startTime;
    363                 Main.debug("Initializing validator tests completed in " + Utils.getDurationString(elapsedTime));
     364                Logging.debug("Initializing validator tests completed in {0}", Utils.getDurationString(elapsedTime));
    364365            }
    365366        }
     
    377378                }
    378379            } catch (Exception e) { // NOPMD
    379                 Main.error(e);
     380                Logging.error(e);
    380381                if (!GraphicsEnvironment.isHeadless()) {
    381382                    JOptionPane.showMessageDialog(Main.parent,
Note: See TracChangeset for help on using the changeset viewer.