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/MessageNotifier.java

    r11969 r12620  
    3030import org.openstreetmap.josm.io.auth.JosmPreferencesCredentialAgent;
    3131import org.openstreetmap.josm.tools.GBC;
     32import org.openstreetmap.josm.tools.Logging;
    3233import org.openstreetmap.josm.tools.Utils;
    3334
     
    8687                }
    8788            } catch (OsmTransferException e) {
    88                 Main.warn(e);
     89                Logging.warn(e);
    8990            }
    9091        }
     
    9798        int interval = PROP_INTERVAL.get();
    9899        if (Main.isOffline(OnlineResource.OSM_API)) {
    99             Main.info(tr("{0} not available (offline mode)", tr("Message notifier")));
     100            Logging.info(tr("{0} not available (offline mode)", tr("Message notifier")));
    100101        } else if (!isRunning() && interval > 0 && isUserEnoughIdentified()) {
    101102            task = EXECUTOR.scheduleAtFixedRate(WORKER, 0, TimeUnit.MINUTES.toSeconds(interval), TimeUnit.SECONDS);
    102             Main.info("Message notifier active (checks every "+interval+" minute"+(interval > 1 ? "s" : "")+')');
     103            Logging.info("Message notifier active (checks every "+interval+" minute"+(interval > 1 ? "s" : "")+')');
    103104        }
    104105    }
     
    110111        if (isRunning()) {
    111112            task.cancel(false);
    112             Main.info("Message notifier inactive");
     113            Logging.info("Message notifier inactive");
    113114            task = null;
    114115        }
     
    153154                }
    154155            } catch (CredentialsAgentException e) {
    155                 Main.warn(e, "Unable to get credentials:");
     156                Logging.log(Logging.LEVEL_WARN, "Unable to get credentials:", e);
    156157            }
    157158        }
Note: See TracChangeset for help on using the changeset viewer.